This is an interactive problem.
Egor and Petr are playing a game called «Colder-Hotter» on a 2D plane. At the beginning of the game Egor thinks of a point with non-negative integer coordinates not exceeding 109. Then Petr tries to guess this point: on the i-th turn he chooses some point with integer coordinates (xi, yi) and tells them to Egor. If this point is closer to the one being guessed than the previous point (xi - 1, yi - 1), then Egor answers "1". Otherwise, and also if this is the first turn of the game, he answers "0".
When there are no more turns left or Petr thinks he has enough information, he stops the game and tells his answer. If the answer is correct Petr is considered to be a winner. As Petr becomes more and more experienced, Egor reduces the number of turns.
The current limit on the number of turns in their game is 500. Petr asks you to write a program that will successfully beat Egor.
Egor is a fair player and does not change the point after the game has started.
The jury program outputs either "1" in case when the current point from player is closer to the one being guessed than the previous point, or "0" when the current point from player is not closer than previous one or there is no previous point.
If a player makes a turn, he must output two integer numbers with a single space character between them — x- and y-coordinates of the pronounced point (0 ≤ x, y ≤ 109). If a player wants to stop the game he must output a character 'A' and then two integer numbers — x- and y-coordinates of the guessed point, and then stop the program.
After each output (one guess or answer) you must print one end of line, flush output stream, and read the answer. See the notes if you do not know how to execute a flush command. If your program receives an EOF (end-of-file) condition on the standard input, it must exit immediately with exit code 0. Failure to comply with this requirement may result in "Time Limit Exceeded" error.
It is guaranteed that the coordinates of the point being guessed are non-negative and do not exceed 109.
0
0
1
0
1
0
1 1
0 0
20 20
20 20
17 239
17 240
A 17 239
The point being guessed in the sample is (x = 17, y = 239). One of the possible scenarios of the game is shown:
To flush the standard output stream, use the following statements:
In C, use fflush(stdout);
In C++, use cout.flush();
In Java, use System.out.flush();
| Name |
|---|


