Clearly this condition must hold if your set is a subgroup (as subgroups are closed under multiplication).

If this condition holds then note that you have the identity in your set (take ), and that if then (take , ).

So the only thing to prove is that if then . However, as , take and ...and your done!