Integer point
Hard
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
The vertices of triangle have integer coordinates. Find any point with integer coordinates strictly inside the triangle. A point must not belong to the boundary of a triangle.
Input
Contains three lines with two integers in each line: x[i]
, y[i]
(-10^6
≤ x[i]
, y[i]
≤ 10^6
) - the coordinates of triangle vertices. It is guaranteed that the triangle is non-degenerate.
Output
If there is no required point, print "No". Otherwise print two integers - the coordinates of any point strictly inside the triangle.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 64
Acceptance rate 13%