Shapes of Clusters and Groups of Galaxies: comparison between