Ta có : \(x^2+xy-2016x-2017y-2018=0\)
\(\Leftrightarrow x^2+xy+x-1-2017x-2017y-2017=0\)
\(\Leftrightarrow x\left(x+y+1\right)-2017\left(x+y+1\right)=1\)
\(\Leftrightarrow\left(x-2017\right)\left(x+y+1\right)=1\)
\(\Rightarrow\left[{}\begin{matrix}\left\{{}\begin{matrix}x-2017=1\\x+y+1=1\end{matrix}\right.\\\left\{{}\begin{matrix}x-2017=-1\\x+y+1=-1\end{matrix}\right.\end{matrix}\right.\) \(\Rightarrow\left[{}\begin{matrix}\left\{{}\begin{matrix}x=2018\\y=-2018\end{matrix}\right.\\\left\{{}\begin{matrix}x=2016\\y=-2018\end{matrix}\right.\end{matrix}\right.\)
Vậy \(\left(x,y\right)\in\left\{\left(2018,-2018\right),\left(2016,-2018\right)\right\}\)