eolymp
bolt
Try our new interface for solving problems
Problems

Distance To Special Point

Distance To Special Point

\textbf{This is an interactive problem} On the plane the integer points with coordinates does not exceeding $10^6$ are labeled. The movement is allowed along the lines that are parallel to the coordinate axis, so the distance between two points that have coordinates $x_1, y_1$ and $x_2, y_2$ is calculated as $|x_1 - x_2| + |y_1 - y_2|$. There is unknown special labeled point $A$. You may for one query ask the distance from the labeled point you choose to the point $A$. Your task is to guess the coordinates of $A$ for two queries. \textbf{Interaction Protocol} The interaction is started by your program. You may ask the queries in the format $"?~x~y"$ --- ask the distance (in definitions of the task) from the labeled point with coordinates $x, y$ to the point $A~(-10^6 \le x, y \le 10^6, x$ and $y$ are integers). If you are ready to print the answer, use the following format: $"!~x~y"~(x$ and $y$ are the coordinates of the point $A$, then exit the program. This action is not considered as a query. \textbf{Note} For the correct interaction print the end-of-line after each query and after the answer and flush the output buffer with the respective functions of your programming language: \begin{itemize} \item cout.flush() or fflush(stdout) for C/C++; \item stdout.flush() for Python; \item look your language documentation for the other languages. \end{itemize}
Time limit 1 second
Memory limit 128 MiB
Input example #1
1

0
Output example #1
? 0 0

? 1 0

! 1 0
Source 2022 Azerbaijan ICPC Qualification