I am reading a textbook titled "Algebra" by Mark R. Sepanski.
In page 179, the author claims that if $D$ is a UFD then every nonzero polynomial $f=\sum_{k} a_k x^k$ (only finitely many nonzero $a_k$'s) in $D[x]$ can be written as a product of an element $c\in D$ and the polynomial $f_0\in D[x]$ which is primitive by taking $c$ to be the gcd of $a_k$'s.
This is how I see it: If $c$ is the gcd of $a_k$'s we have that $a_k=ca_k'$ for some $a_k'\in D$. Now we can consider the polynomial $f_0=\sum a_k'x^k$. So we have $f=cf_0$ and finally we want to prove that $f_0$ is primitive.
I do not see how this could be done without using Bézout's identity which holds in $\mathbb Z$. If Bézout's identity worked for any UFD $D$ then we could write that $\sum_k f_ka_k=c$ for some $f_k$'s in $D$. Then $\sum_k f_k a_k' =1$. That would force gcd of $a_k$'s to be 1.
I am not really sure if Bézout's identity holds in an arbitrary UFD $D$ and I would not expect that as well.
So how do I prove the author's claim without Bézout's identity?