You are given six integers A1,B1,C1,A2,B2,C2 with A1B2=A2B1. They are the coefficients of two lines that cross at a single point:
These two lines divide the plane into four regions. Each region can be named by any integer point that lies inside it, that is, a point lying on neither line. You are given one such integer point (a,b). Among all integer points that lie in the same region as (a,b), find the one whose Euclidean distance to the intersection point of l1 and l2 is smallest.
The first line contains three integers A1,B1,C1 separated by single spaces, the coefficients of l1. The second line contains three integers A2,B2,C2, the coefficients of l2; it is guaranteed that A1B2=A2B1. The third line contains two integers a and b, the coordinates of a point that lies in one region and on neither line. Every integer x in the input satisfies −2100000000<x<2100000000.
Print two integers c and d separated by one space: the coordinates of an integer point that lies in the same region as (a,b) and whose distance to the intersection of l1 and l2 is as small as possible. If several integer points share that smallest distance, print the lexicographically smallest one: the point with the smallest c, and among those the one with the smallest d.
The two lines split the plane into four regions, and the point (a,b) selects one of them. The answer is the integer point of that region closest to the crossing point.
