Author:  A. Baranov  Time limit:  1 sec  
Input file:  Standard input  Memory limit:  256 Mb  
Output file:  Standard output 
Let's consider a function of the following form: F(X, Y) = AB ⋅ X + CD ⋅ Y.
The task is to find integer values for A, B, C and D, such that for a given set of points (X_{i}, Y_{i})
the specified function satisfies predetermined conditions:
RoundDawn(F(X_{i}, Y_{i})) = Z_{i} or RoundUp(F(X_{i}, Y_{i})) = Z_{i},
where RoundDawn() и RoundUp() — denote rounding down and rounding up, respectively.
The input begins with the number N, followed by N conditions, each written in the following format.
First, the operation sign is indicated: '>' for RoundDawn or '<' for RoundUp.
Then, three integers follow: X_{i}, Y_{i}, Z_{i}.
If the problem has a solution, the output contains the number 1,
followed by the found values of A, B, C and D.
If there is more than one solution, any of them can be output.
If there is no solution, the output is the single number 0.
All input values are integers.
− 40 ≤ (X_{i}, Y_{i}, Z_{i}) ≤ 40, 0 < N ≤ 2000
No.  Standard input  Standard output 

1 


2 

