Any person, who in public or private, commits an act of gross indecency with another person of the same sex, or procures or attempts to procure another person of the same sex to commit an act of gross indecency with him or her, is guilty of an offence and liable to imprisonment for five years.