For how many ordered pairs $(x,y)$ of integers is it true that $0 < x < y < 10^{6}$ and that the arithmetic mean of $x$ and $y$ is exactly $2$ more than the geometric mean of $x$ and $y$?
For how many ordered pairs $(x,y)$ of integers is it true that $0 < x < y < 10^{5}$ and that the arithmetic mean of $x$ and $y$ is exactly $9$ more than the geometric mean of $x$ and $y$?