Subring of $\mathbb{R}$ In the field of rational numbers, the following subsets are given:
$$
M = \left\{ a + b\frac{1+\sqrt{17}}{2}\right\} a,b \in \mathbb{Z}\ 
\text{and}\ 
N = \left\{ a + b\frac{1+\sqrt{7}}{2}\right\} a,b \in \mathbb{Z}
$$
Show that $M$ is a subring of $\mathbb{R}$ and $N$ in NOT a subring of $\mathbb{R}$.
I tried using the following conditions which give us that a subset is a subring of a ring:
$1.\  a+b \in M$ for all $a,b \in M$
$2.\ ab \in M$ for all $a,b \in M$
$3.\ (M,+) \le (\mathbb{R},+)$
But I get stuck on the second one, multiplication. I can't get what is the difference between $\sqrt{17}$ and $\sqrt{7}$. Why the first is a subring, the second - NOT?
Any help would be appreciated!

$$ \left( \frac{1 + \sqrt{17}}{2}\right)^2 = \frac{9+\sqrt{17}}{2} = 4 + \frac{1+\sqrt{17}}{2}$$
$$ \left( \frac{1 + \sqrt{7}}{2}\right)^2 = \frac{4+\sqrt{7}}{2} = \frac{3}{2} + \frac{1+\sqrt{7}}{2}$$
$4$ is an integer, $\frac{3}{2}$ is not.
