Let $R$ be a PID, and let $\pi\in R$ be prime. Is it $R/\langle\pi\rangle \times R/\langle \pi\rangle$ a cyclic $R$-module? Need help with this question:

Let $R$ be a PID, and let $\pi\in R$ be prime. Is it ever the case that $$R/\langle\pi\rangle \times  R/\langle \pi\rangle$$ is cyclic as $R$-module? 

So my attempt is horrible, here it goes 
Proof: Since $\langle\pi\rangle$ is a prime ideal, $R/\langle\pi\rangle$ is either isomorphic to R or $0$ (Since every prime ideal is either zero or maximal in a PID.) If it is 0, this is trivially cylcic. However if it was R, then $R \times R$ is cylic if and only if R is cyclic.
So this is my horrible attempt, I just need help getting pointed to the right direction. 
 A: First: if the ideal is prime, then by definition it cannot equal the whole ring. So it is not true that $R/\langle \pi\rangle$ would be trivial; it can never be trivial. A maximal ideal, by definition, is not equal to the whole ring, so you will not get zero. 
I mean, look at $R=\mathbb{Z}$. The prime ideals are $(p)$ with $p$ a prime and $(0)$. Is $\mathbb{Z}/(p)$ the zero ring? No.
As to your question... no, it is never cyclic. 
For simplicity, I will write $P=\langle \pi\rangle$. 
Suppose that $M=(R/P)\times (R/P)$ is cyclic. Then there exist $a,b\in R$ such that $(a+P,b+P)$ generates $M$ as a module. In particular, there exists $r\in R$ such that $r(a+P,b+P) = (1+P,0+P)$; hence $ra-1\in P$ and $rb\in P$. Because $P$ is a prime ideal, that means that either $r\in P$ or $b\in P$. But we cannot have $r\in P$, because then $ra\in P$, so $ra-1\in P$ implies $1\in P$, which is impossible for a prime ideal (because it cannot equal the whole ring). Thus, $b\in P$, so $b+P = 0+P$. But then $\langle (a+P,b+P)\rangle = \langle (a+P,0+P)\rangle$ cannot contain the element $(0+P,1+P)$ (because the second component is always $0+P$), a contradiction. The contradiction arises from the assumption that $M$ is cyclic, so we conclude that $M$ is not cyclic.
A: Why should $R/\langle\pi\rangle$ be either $R$ or $0$? It can be $R$, when $\pi=0$, but $0$ is not a prime element, so this is excluded. It cannot be $0$, because $\pi$ is prime, hence not invertible, so $\langle\pi\rangle\ne R$.
You're confused with the quotient ring: indeed $R/\langle\pi\rangle$ is a field, so its ideals are either zero or the whole ring, but this is a completely different affair.
The question deals with $R/\langle\pi\rangle$ as a module over $R$.
Suppose $R/\langle\pi\rangle\times R/\langle\pi\rangle$ is cyclic. Then it has a generator, say $(a+\langle\pi\rangle,b+\langle\pi\rangle)$. In particular, there are $x,y\in R$ such that
$$
x(a+\langle\pi\rangle,b+\langle\pi\rangle)=(1+\langle\pi\rangle,0+\langle\pi\rangle),\qquad
y(a+\langle\pi\rangle,b+\langle\pi\rangle)=(0+\langle\pi\rangle,1+\langle\pi\rangle)
$$
which means 


*

*$1-xa\in\langle\pi\rangle$,

*$xb\in\langle\pi\rangle$,

*$ya\in\langle\pi\rangle$,

*$1-yb\in\langle\pi\rangle$.


Since the ideal is prime, the second condition implies that either $x\in\langle\pi\rangle$ or $b\in\langle\pi\rangle$. In the first case $1\in\langle\pi\rangle$: contradiction. Therefore $b\in\langle\pi\rangle$. But then the fourth condition implies $1\in\langle\pi\rangle$. Contradiction.
Another way to prove this is by verifying that if $P,Q$ are prime ideals of $R$ and $R/P\times R/Q$ is cyclic, then $P+Q=R$.
The idea is the same: if $(a+P,b+Q)$ is a generator, there exists $x\in R$ with $x(a+P,b+Q)=(1+P,0+Q)$. Then $1-xa\in P$ and $xb\in Q$. Therefore either $x\in Q$ or $b\in Q$. The latter case is impossible, because otherwise there would be no $y\in R$ such that $y(a+P,b+Q)=(0+P,1+Q)$.
Hence $x\in Q$, so we have $1-xa=z\in P$ and $1=z+xa\in P+Q$ and therefore $P+Q=R$. In your case $P=Q=\langle\pi\rangle$, so $P+Q=\langle\pi\rangle\ne R$.
