Subtask 1
You can output what is given in the sample. Alternatively, ask 1, 2 and 3.
Subtask 2
First ask 1 and 2. Let the returned value be x.
Then ask 10 and 20. Let the returned value be y.
Then, ask $y