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.
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]$ ?