Vasilythebearhasafavoriterectangle, ithasonevertexatpoint (0 ,? 0), andtheoppositevertexatpoint (x ,? Y). Ofcourse, thesidesofVasyasfavoriterectangleareparalleltothecoordinateaxes. Vasyaalsolovestriangles
Vasily the bear has a favorite rectangle, it has one vertex at point (0 ,? 0), and the opposite vertex at point (x ,? Y). Of course, the sides of Vasya's favorite rectangle are parallel to the coordinate axes. Vasya also loves triangles
Vasily the bear has a favorite rectangle, it has one vertex at point (0 ,? 0), and the opposite vertex at point (X,?Y). Of course, the sides of Vasya's favorite rectangle are parallel to the coordinate axes.
Vasya also loves triangles, if the triangles have one vertex at pointB? =? (0 ,? 0). That's why today he asks you to find two pointsA? =? (X1 ,?Y1) andC? =? (X2 ,?Y2), such that the following conditions hold:
- The coordinates of points:X1,X2,Y1,Y2 are integers. Besides, the following inequation holds:X1? X2;
- The triangle formed by pointA,BAndCIs rectangular and isosceles (is right );
- All points of the favorite rectangle are located inside or on the border of triangleABC;
- The area of triangleABCIs as small as possible.
Help the bear, find the required points. It is not so hard to proof that these points are unique.