package adv2016; import java.io.PrintWriter; import java.util.Arrays; import java.util.Scanner; public class N471_2 { static Scanner in; static PrintWriter out; static String INPUT = ""; // (0 1)(x-a) +(a) // (-1 0)(y-b) (b) static long[][][] ret = new long[3][3][]; static void solve() { int m = ni(); int[][] co = new int[m][]; for(int i = 0;i < m;i++) { co[i] = new int[] {ni(), ni()}; } for(int i = 0;i < 3;i++) { for(int j = 0;j < 3;j++) { out.println("? " + i + " " + j); out.flush(); long x = nl(), y = nl(); ret[i][j] = new long[] {x, y}; } } int[][] M = { {0, 1}, {-1, 0} }; int[][] A = { {1, 0}, {0, 1} }; outer: for(int k = 0;k < 4;k++) { A = mul(A, M); // A[0][0]*x + A[0][1]*y + s = X // A[1][0]*x + A[1][1]*y + t = Y long S = ret[0][0][0], T = ret[0][0][1]; for(int i = 0;i < 3;i++) { for(int j = 0;j < 3;j++) { if(A[0][0] * i + A[0][1] * j + S != ret[i][j][0])continue outer; if(A[1][0] * i + A[1][1] * j + T != ret[i][j][1])continue outer; } } out.println("!"); for(int[] v : co) { out.println( (A[0][0] * v[0] + A[0][1] * v[1] + S) + " " + (A[1][0] * v[0] + A[1][1] * v[1] + T) ); out.flush(); } return; } // (1,0) -> (0,-1) // (0 1 x) // (-1 0 y) // (0 0 1) } public static int[][] mul(int[][] A, int[][] B) { assert A[0].length == B.length; int m = A.length; int n = A[0].length; int o = B[0].length; int[][] C = new int[m][o]; for(int i = 0;i < m;i++){ for(int k = 0;k < n;k++){ for(int j = 0;j < o;j++){ C[i][j] += A[i][k] * B[k][j]; } } } return C; } public static void main(String[] args) throws Exception { in = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(INPUT); out = new PrintWriter(System.out); solve(); out.flush(); } static int ni() { return Integer.parseInt(in.next()); } static long nl() { return Long.parseLong(in.next()); } static double nd() { return Double.parseDouble(in.next()); } static void tr(Object... o) { if(INPUT.length() != 0)System.out.println(Arrays.deepToString(o)); } }