Let G,H,K be finitely generated abelian groups. Show that if G*H is isomorphic to G*K , then H is isomorphic to K, where * represents the external direct product of groups.

One simple idea of this problem is to divide G,H,K into Z(p1^k1)*Z(p2^k2)...,but the question is to prove the unity of such representation, that is to say, is it possible that Z(6)*Z(2) isomorphic to Z(2)*Z(2)*Z(3), or the more general situation?

Thank you!