Could you show me how to solve this problem?

In a place there are 577 people from 9 different cities.

In every subset of 9 people there are at least 2 who have the same height.

Prove that there are 5 people from the same city that have the same height

and the same sex.

Thanks