Hint BTCODE_A

Hey all,

I am trying this problem. I am not getting how to solve this problem.
i only came to one conclusion that

xd must be of the form (a * xs + b * ys) and yd must be of form (c * xs + d * ys) where a,b,c,d are integer constants. if they are not integers then answer is no.

i dont know how to verify this. help anyone?

I already read some solutions still i didn’t get the logic, it is related to gcd of xs,ys and xd,yd.

Thanks in advance

Hey the theory behind this is that GCD(a,b) is the smallest positive linear combination of a and b. You can refer to this, mostly lecture number 4 or 5. They have explained it very clearly.

Thanks alot :smiley: