Since (x,y)⋅[x,y]=xy, then the first equation of the system can be re-written as
(x,y)xy+(x,y)=2018,
which gives us quadratic equation with respect to (x,y):
(x,y)2−2018(x,y)+xy=0.
Its discriminant, also taking into account the second equation of the system, is
D=20182−4xy=20182−4x(2018−x)=(2x−2018)2.
Which gives x=22018±(2x−2018)⇒x1=x and x2=2018−x=y.
Hence, one of the numbers equals GCD, which means it divides the other number. E.g., let x≤y, i.e. y=kx, then (k+1)x=2018. Hence, these are the possible cases:
Case 1. k+1=2018⇒x=1 and y=2017.
Case 2. k+1=1009⇒x=2 and y=2016.
Case 3. k+1=2⇒x=1009=y.