Ta có:
\(x+y=y.x\)
\(\Rightarrow x+y-xy=0\)
\(\Rightarrow x+y-xy-1=-1\)
\(\Rightarrow\left(x-xy\right)+\left(y-1\right)=-1\)
\(\Rightarrow x\left(1-y\right)-\left(1-y\right)=-1\)
\(\Rightarrow\left(1-y\right)\left(x-1\right)=-1\)
\(\Rightarrow1-y;x-1\inƯ\left(-1\right)=\left\{\pm1\right\}\)
\(\Rightarrow\left[\begin{matrix}1-y=-1\Rightarrow y=2\\x-1=-1\Rightarrow x=0\end{matrix}\right.\)
\(\Rightarrow\left[\begin{matrix}1-y=1\Rightarrow y=0\\x-1=1\Rightarrow x=2\end{matrix}\right.\)
Vậy \(x=\left\{0;2\right\};y=\left\{0;2\right\}\)