Prove that GCD(a,m)=1 if and only if the equivalence class of a in Zm is a unit.

Thanks!