Ghirlanda-Guerra identities and ultrametricity: An elementary proof in the discrete case