~/algor $ cat problems/kopburchak-va-nuqtalar
Polygon and points
A polygon with $n$ vertices is given on the plane: its vertices are listed in order (clockwise or counterclockwise), and the polygon does not intersect itself. Then $q$ points are given. For each point print ICHIDA if it lies inside the polygon, CHEGARADA if it lies on its boundary (on a side or at a vertex), and TASHQARIDA if it lies outside.
Input
The first line contains a positive integer $n$. Each of the next $n$ lines contains two integers: $x_{i}$ and $y_{i}$.
The next line contains a positive integer $q$. Each of the next $q$ lines contains the two integer coordinates of a point.
Output
For each point, on a separate line, ICHIDA, CHEGARADA or TASHQARIDA.
Note
$3 \le n \le 1000$
$1 \le q \le 100$
all coordinates are from $-10^{4}$ to $10^{4}$
Examples
5 0 0 4 0 4 4 2 2 0 4 3 1 1 2 3 4 2
ICHIDA TASHQARIDA CHEGARADA
3 0 0 2 0 0 2 2 1 1 2 2
CHEGARADA TASHQARIDA