18. (2007 Bulgarian National Mathematical Olympiad) Find all positive integers $x, y$ such that $\left(x y^{2}+2 y\right)$ | $\left(2 x^{2} y+x y^{2}+8 x\right)$.
18. Since \(x y^{2}+2 y\) divides \((2 x+y)\left(x y^{2}+2 y\right)-y\left(2 x^{2} y+x y^{2}+8 x\right)=2 y^{2}-4 x y\),
the problem
so, \((x y+2) \mid(2 y-4 x)\).
Now consider two cases.
(1) Suppose \(2 y-4 x \geqslant 0\).

If \(x \geqslant 2\), then \(x y+2>2 y-4 x\), thus, \(2 y-4 x=0\), i.e., \(x=a, y=2 a\) (where \(a \geqslant 2\) is a positive integer).
Upon verification, \(x y^{2}+2 y=4 a\left(a^{2}+1\right)\) and \(2 x^{2} y+x y^{2}+8 x=8 a\left(a^{2}+1\right)\) satisfy the conditions.
If \(x=1\), then \((y+2) \mid(2 y-4)\), i.e.,
\((y+2) \mid[2(y+2)-(2 y-4)]=8 \Rightarrow y=2\) or 6.
Upon verification, \(y=2\) satisfies the condition, \(y=6\) is discarded.
Thus, the solutions are \((a, 2 a)\left(a \in \mathbf{N}_{+}\right)\).
(2) Suppose \(2 y-4 x < 0\).
If \(y \geqslant 4\), then \(x y+2>4 x-2 y\),
thus, \(y=1, 2\) or 3.
If \(y=1\), then \(\frac{2 x^{2}+9 x}{x+2}=2 x+5-\frac{10}{x+2}\) is an integer, hence, \(x=3\) or 8.
If \(y=2\), then \(\frac{x^{2}+3 x}{x+1}=x+2-\frac{2}{x+1}\) is an integer, hence, \(x=1\).
If \(y=3\), then \(\frac{6 x^{2}+17 x}{9 x+6}\) is an integer, thus, \(3 \mid x\).
Let \(x=3 k\left(k \in \mathbf{N}^{+}\right)\), then
\(\frac{18 k^{2}+17 k}{9 k+2}=2 k+1+\frac{4 k-2}{9 k+2}\) is an integer. For \(k \geqslant 1\) this is impossible.
In summary, all solutions are \((a, 2 a)\left(a \in \mathbf{N}_{+}\right)\) and \((3,1),(8,1)\).