Solution (source code)

= Solution

Suppose $p$ is irreducible and
$$
(p)\subseteq(a)\subseteq R.
$$
Then $p=ab$ for some $b\in R$. Irreducibility says that either $a$ is a unit, in which case $(a)=R$, or $b$ is a unit, in which case $(a)=(p)$. Thus no proper ideal lies strictly between $(p)$ and $R$, so
$$
\boxed{(p)\text{ is a maximal ideal}}.
$$