The triangle and the point
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
The coordinates of the vertices of triangle and one more point are given in Cartesian coordinate system. Determine whether the given point belongs the triangle.
Input
The four lines contain two numbers - the points coordinates. The first three lines contain the coordinates of triangle vertices, the fourth line - the coordinates of the tested point. All coordinates are integer, for every point (x, y) the following condition is true: -10 000 ≤ x, y ≤ 10 000.
Output
Print the word "In", if the point is inside a triangle or on its border, or "Out" - if outside.
Examples
Input #1
Answer #1
Submissions 4K
Acceptance rate 27%