eolymp
bolt
Try our new interface for solving problems
Problems

The triangle and the point

The triangle and the point

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. \InputFile 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 (\textbf{x}, \textbf{y}) the following condition is true: \textbf{-10 000} ≤ \textbf{x}, \textbf{y} ≤ \textbf{10 000}. \OutputFile Print the word "\textbf{In}", if the point is inside a triangle or on its border, or "\textbf{Out}" - if outside.
Time limit 1 second
Memory limit 64 MiB
Input example #1
0 0
100 0
0 100
100 100
Output example #1
Out