For every integer $d \equiv 0,1 \mod 4,$ we define a quadratic ring $\mathcal{O}_d$ by: If $d \equiv 0 \mod 4,$ let $\mathcal{O}_d = \mathbb{Z}\left[\sqrt{\dfrac{d}{4}} \right].$ If $d$ is a non-square congruent to $1,$ then $\mathcal{O}_d = \left\{ \dfrac{a+b\sqrt{d}}{2} a \equiv b \mod 2 \right\} = \mathbb{Z}\left[\dfrac{1 + \sqrt{d}}{2} \right].$
Let $d$ be a non-square discriminant. If $I \subset \mathcal{O}_d$ is a nonzero ideal, then $I \cong \mathbb{Z}^2$ as an abelian group.
I know that $I \cong \{0\},\mathbb{Z},$ or $\mathbb{Z}^2$ but not really sure where to go? This problem is tough.