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$$?

(第十八届AIME1 2000 第6题)