#0001CD

z-redblue

There are N points on a plane. Some of the points are red, some green, some blue and some yellow.

You know the coordinates of all the points, but you don't know their colors. However, you know that there are two non-parallel lines that divide the plane into 4 regions, and you know that all the points in the same region have the same color.

Little Z provided you with a program that will tell you the color of a certain point, however the program will answer your queries correctly only 200 times, after which it will start giving you random answers.

You have to find how many of the points are red, green, blue and yellow



InputThis is an interactive task.

From the first line of the standard input read one integer N (1 <= N <= 50000). From each of the next N lines read two integers representing the point's coordinate. All the coordinates will be in the range [-10000 to 10000].

After that you can start asking questions in the following form:
gimme [n] - You write "gimme" followed by a space and the index of the point (the points are zero indexed). After issuing this command you can read a string from the next line. The string will be either "red", "green", "blue" or "yellow".


OutputWhen you are ready to give the final answer, write
result [red] [green] [blue] [yellow] - You write "results" followed by a splace and the number of red, green, blue and yellow points - all separated by a space.


You read:5
You read: 0 0
You read: 1 0
You read: 1 1
You read: 0 1
You read: 2 2
You write: gimme 0
You read: red
You write: gimme 1
You read: blue
You write: gimme 2
You read: green
You write: gimme 3
You read: yellow
You write: results 1 2 1 1


Don't forget to flush the output after each issued command.
In c: fflush(stdout)
In c++: cout.flush()
In pascal: flush(output)

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.