You have Q triangles, numbered 1 through Q.
The coordinates of the vertices of the i-th triangle are (x_1_i,y_1_i), (x_2_i,y_2_i) and (x_3_i,y_3_i) in counterclockwise order. Here, x_1_i, x_2_i, x_3_i, y_1_i, y_2_i and y_3_i are all integers.
For each triangle, determine if there exists a grid point contained in its interior (excluding the boundary). If it exists, construct one such point.
Input is given in the following format:
Q
x_1_1 y_1_1 x_2_1 y_2_1 x_3_1 y_3_1
x_1_2 y_1_2 x_2_2 y_2_2 x_3_2 y_3_2
…
x_1_Q y_1_Q x_2_Q y_2_Q x_3_Q y_3_Q
Output should contain Q lines.
In the i-th line, if there is no grid point contained in the interior (excluding the boundary) of Triangle i, print "-1 -1". If it exists, choose one such grid point, then print its x-coordinate and y-coordinate with a space in between.
All input values are integers, 1≤Q≤10,000, 0≤x_1_i,x_2_i,x_3_i,y_1_i,y_2_i,y_3_i≤109, (x_1_i,y_1_i), (x_2_i,y_2_i) and (x_3_i,y_3_i) are listed in counterclockwise order, the triangles are non-degenerate.