4. Calculate all pairs of integers $(x, y)$ such that

$$
3^{4} 2^{3}\left(x^{2}+y^{2}\right)=x^{3} y^{3}
$$
Solution. Note first that if $xy=0$, then $x^2+y^2=0$, which yields the solution $x=y=0$. Also note that if $xy<0$, then
$x^2+y^2<0$, which is absurd, so $x, y$ must both have the same sign. Since changing the sign of both $x$ and $y$ simultaneously does not alter the equation, we can assume from this point on, without loss of generality, that $x, y$ are both positive integers. Let $x=3^m a$ and $y=3^n b$ with $m, n$ non-negative integers and $a, b$ integers that are coprime and not divisible by 3. Suppose that $m \geq n$. Then the given equation transforms into

$$
8\left(\left(3^{m-n} a\right)^{2}+b^{2}\right)=3^{3 m+n-4} a^{3} b^{3}
$$

Since every perfect square gives a remainder of 0 or 1 when divided by 3, as is well known, the left-hand side is not divisible by 3, and for the equation to hold, the exponent of 3 in the right-hand term must be zero. That is, $3m+n-4=0$ and since $m \geq n \geq 0$, this implies that $m=n=1$. The equation now simplifies to

$$
8\left(a^{2}+b^{2}\right)=a^{3} b^{3}
$$

By the symmetry of the expression, we can assume that $a \geq b$. Then

$$
16 a^{2} \geq a^{3} b^{3} \Leftrightarrow 16 \geq a b^{3}
$$

and we have two possibilities (1) $b=2$ from which $a=2$ follows, (2) $b=1$ but in this case the only possible values of $a$ are $1,2,4,8$ and they do not satisfy the equation $a^{3}-8 a^{2}-8=0$. It follows that $(a, b)=(2,2)$ and $(x, y)=(6,6)$. Finally, the only possible solutions are:

$$
(x, y)=(-6,-6), \quad(x, y)=(0,0), \quad(x, y)=(6,6)
$$