Internal point
Easy
Execution time limit is 2 seconds
Runtime memory usage limit is 128 megabytes
Given a strictly convex n-polygon and k points.
For each point you need to determine where she is - inside, on the border, or outside.
Input
Number n (3 ≤ n ≤ 10^5
). Then given n points - the vertices of the polygon.
Number k (0 ≤ k ≤ 10^5
). Then given k points - the queries.
All coordinates are integer, not exceeding 10^7
by absolute value.
Output
For each query print on a separate line INSIDE, BORDER or OUTSIDE.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 13%