Triangle and Point 2
Easy
Execution time limit is 0.1 seconds
Runtime memory usage limit is 64 megabytes
Given the coordinates of a triangle's vertices and a point, determine the location of the point relative to the triangle.
Output "In" if the point is inside the triangle, "Edge" if the point is on one of the triangle's sides, "Vertex" if the point coincides with one of the triangle's vertices, and "Out" if the point is outside the triangle.
Input
The input consists of four lines, each containing 2 integers. These integers do not exceed 10000000 in absolute value.
The first three lines provide the coordinates of the triangle's vertices: A(X_1, Y_1), B(X_2, Y_2), C(X_3, Y_3). The fourth line gives the coordinates of the point O(X_0, Y_0).
Output
Output the location of the point relative to the triangle.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 9%