Let $\mathbb Z$ be the ring of integers. We have the subring of $\mathbb Z[x]$ generated by integers and $p_1$ and $p_2$ ($p_1$ and $p_2$ are polynomials), and denote it as $\mathbb Z[p_1,p_2]$. I've got for my homework to investigate if $\mathbb Z[p_1,p_2]$ is UFD.
In the first task, $p_1=x^2-x^5$ and $p_2=x^2-2x^5$.
In the second task, $p_1=x^2+x^6$ and $p_2=x^2+2x^6$.
I don't even know how to start so if someone could help me I would be very grateful.