Comparison of Milky Way and Andromeda galaxies