I have this kind of exercise in which I need help:

Let R be integral domain. Assume that there is an element $\displaystyle p \in R\setminus U(R), p \neq 0$, so that if $\displaystyle p\mid xy$ then $\displaystyle p\mid x $ or $\displaystyle p\mid y$ with every $\displaystyle x,y \in R$. Show that $\displaystyle p$ is irreducible. (U(R) = the group of units of R)

Any help would be great.