There's a hidden string of digits (from 0 to 9) of length $$$N \ (1 \leq N \leq 18)$$$. You want to find out whether there's a substring of any size inside this hidden number that is divisible by $$$3$$$.
You are allowed to ask up to 2 queries of the following format: "? i", which tells you the digit at the requested index $$$i$$$ $$$(1 \leq i \leq N)$$$.
The first line contains the integer $$$N$$$, the length of the hidden string.
You're allowed a maximum of 2 queries of the following format: ? i
After making a query, you get a single line containing a digit from 0 to 9 indicating the digit at the index $$$i$$$ in the hidden string.
To make an answer, output a single line containing ! 1 if there's a substring that's divisible by 3. Otherwise, ! 0.
2 6 8
? 1 ? 2 ! 1
| Name |
|---|


