an Integral domain D is a UFD if and only if D is atomic and gcd domain.
I know that a UFD is Atomic, but i don't know how to prove it is a gcd domain.
the other side of the proof: I do understand that Atomic isnt necessary a UFD, but I cant find the reason that gcd + atomic makes it a UFD