An Euclidean Domain is a Unique Factorization Domain.

Furthermore we have the property for and field, and F[x].

That if p(x) is irreducible over F and p(x) divides g(x)h(x) then f(x) divides either g(x)orf(x) divides h(x).

"Prime" factorize,

f(x)=r_1(x)r_2(x)...r_k(x)

Now,

f(x) divides g(x)h(x).

Thus,

r_1(x)...r_k(x) divides g(x)h(x).

Thus,

r_1(x) divides g(x)h(x) .... r_k(x) divides g(x)h(x).

Since r_i(x) are irreducible over F, we have that,

r_i(x) divides either g(x) or h(x).

But r_i(x) does not divide g(x) for that will imply that,

gcd(f(x),g(x))! =1

Thus,

r_i(x) divides h(x).

Hence,

f(x) divides h(x).