A certain integral domain is not a unique factorization domain. I am trying to prove the following : $R$ is an ID and let $F$ be its field of fractions. Suppose there exists a monic $p(x) \in R[x]$ such that $p(x)=a(x)b(x)$ where both $a,b$ are monic and non constant polynomials of $F[x]$ but $a\notin R[x]$. Then I need to show that $R$ is not a UFD. 
Usually I write my ideas and my attempt but I gave no idea how to begin. Any help is appreciated but hints are appreciated more than a complete solution. Thanks for your time. 
 A: Allow $R$ to be a UFD. $ra(x) \in R[x]$ for some $r \in R$. Now, $rp(x) = r(a(x)) \cdot (b(x))$. What does the fact that  $p(x)$ is monic imply about $r$? Does this contradict $a(x) \not\in R[x]$ ? 
A: Suppose $R$ is a UFD.

Our goal is to derive a contradiction.

Suppose 
$$a(x) = \sum_{i=0}^m a_ix^i\;\;\text{(where each $a_i \in F$, and $a_m =1$})$$
$$b(x) = \sum_{i=0}^n b_ix^i\;\;\text{(where each $b_i \in F$, and $b_n =1$})$$
Since $R$ is a UFD, there exists a least common denominator, $r$ say, for $a_0,...,a_m$, and a least common denominator, $s$ say, for $b_0,...,b_n$. Thus, we can write
\begin{align*}
&\qquad a(x) = A(x)/r\\[4pt]
&\qquad b(x) = B(x)/s\\[6pt]
&\;\;\text{where}\\[6pt]
&\qquad{\small{\bullet}}\;\;r,s \in R,\;\text{and}\;r,s \ne 0\\[4pt]
&\qquad{\small{\bullet}}\;\;A,B \in R[x]\\[4pt]
&\qquad{\small{\bullet}}\;\;\text{The coefficients of $A$ have no nonunit common factor}\\[4pt]
&\qquad{\small{\bullet}}\;\;\text{The coefficients of $B$ have no nonunit common factor}\\[6pt]
&\;\;\text{Hence, we have}\\[6pt]
&\qquad (rs)p(x) = A(x)B(x)\\[6pt]
&\;\;\text{with}\\[6pt]
&\qquad A(x) = \sum_{i=0}^m A_ix^i\;\;\text{(where each $A_i \in R$, and $A_m =r$})\\[4pt]
&\qquad B(x) = \sum_{i=0}^n B_ix^i\;\;\text{(where each $B_i \in R$, and $B_n =s$})\\[4pt]
\end{align*}
Since $a(x) \in F[x]\setminus R[x]$, it follows that $r$ is not a unit of $R$, hence, since $r \ne 0$, $r$ has a prime factor, $w$ say.
Since $A_0,...,A_m$ have no nonunit common factor, and $B_0,...,B_n$ have no nonunit common factor, at least one of $A_0,...,A_m$ is not a multiple of $w$, and at least one of $B_0,...,B_n$ is not a multiple of $w$.

Let $i$ be the least nonnegative integer such that $A_i$ is not a multiple of $w$, and let $j$ be the least nonnegative integer such that $B_j$ is not a multiple of $w$.

But every coefficient of $(rs)p(x)$ is a multiple of $w$. In particular, the coefficient of $x^{i+j}$ is a multiple of $w$. Then considering the expansion of $A(x)B(x)$, the choice of $i,j$ implies that the coefficient of $x^{i+j}$ is congruent to $A_iB_j\;(\text{mod}\;w)$, contradiction, since $w$ is prime, and neither of $A_i,B_j$ is a multiple of $w$.

It follows, as was to be shown, that $R$ is not a UFD.
