INPUT FILE: inout.in
OUTPUT FILE: inout.out
Given a convex polygon, whose vertices are given in counterclockwise order, determine whether a given point (x, y) lies inside or outside the polygon. Also, determine the area of the polygon.
INPUT
On the first line is n, the number of vectices of the polygon.
On each of the next n lines are the coordinates (xi, yi)
of a vertex of the polygon.
On the last line are the co-ordinates of the point (x, y).
The input file will contain several test cases, terminated by a "0".
OUTPUT
For each input set, print the area of the polygon ("AREA = ...") with
3 digits after the decimal place. On the next line print whther the point (x,
y) lies inside (count points on the border as being inside) or outside the
polygon.
Sample Input File
4 0.0 0.0 1.0 0.0 1.0 1.0 0.0 1.0 0.5 0.5 0
Output for Sample Input
AREA = 1.000 INSIDEDownloader failed! Response object 006~ASP 0159~Buffering Off~Buffering must be on.