Straight Lines

No attempts yetTime limit1sMemory limit128 MB

Problem

You are given six integers A1,B1,C1,A2,B2,C2A_1, B_1, C_1, A_2, B_2, C_2 with A1B2A2B1A_1 B_2 \neq A_2 B_1. They are the coefficients of two lines that cross at a single point:

  • l1:A1x+B1y+C1=0l_1: A_1 x + B_1 y + C_1 = 0
  • l2:A2x+B2y+C2=0l_2: A_2 x + B_2 y + C_2 = 0

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)(a, b). Among all integer points that lie in the same region as (a,b)(a, b), find the one whose Euclidean distance to the intersection point of l1l_1 and l2l_2 is smallest.

Input

The first line contains three integers A1,B1,C1A_1, B_1, C_1 separated by single spaces, the coefficients of l1l_1. The second line contains three integers A2,B2,C2A_2, B_2, C_2, the coefficients of l2l_2; it is guaranteed that A1B2A2B1A_1 B_2 \neq A_2 B_1. The third line contains two integers aa and bb, the coordinates of a point that lies in one region and on neither line. Every integer xx in the input satisfies 2100000000<x<2100000000-2100000000 < x < 2100000000.

Output

Print two integers cc and dd separated by one space: the coordinates of an integer point that lies in the same region as (a,b)(a, b) and whose distance to the intersection of l1l_1 and l2l_2 is as small as possible. If several integer points share that smallest distance, print the lexicographically smallest one: the point with the smallest cc, and among those the one with the smallest dd.

Hint

The two lines split the plane into four regions, and the point (a,b)(a, b) selects one of them. The answer is the integer point of that region closest to the crossing point.