The problem asks to check if it is possible to rotate a square(of side length R*sqrt(2) in the problem) with fixed center(origin on 2-D plane) such that two points p1(x,y) and p2(x,y) lies on the border of square.
I have coded a solution using floating point operations, but it is failing on test #10.
It would be great help if anyone can help with a method using integer operations.