import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class prog { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String s = br.readLine(); int sz = Integer.parseInt(s); int counter = 0; int lastX = 0; int lastY = 0; do { if (counter == 0) { System.out.println("0 0"); } else { int myX = -lastX; int myY = -lastY; String res = myX + " " + myY; System.out.println(res); } s = br.readLine(); if ((s != null) && !s.isEmpty()) { String[] parts = s.split(" "); lastX = Integer.parseInt(parts[0]); lastY = Integer.parseInt(parts[1]); counter++; } } while (s != null); } }