import java.io.FileNotFoundException;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 *
 * @author sorin
 */
public class prog {

    public static void main(String[] args) throws FileNotFoundException {
       // File homedir = new File(System.getProperty("user.home"));

        // Scanner scanner = new Scanner(new File(homedir, "/Downloads/A-large.in"));
        try {
            Scanner scanner = new Scanner(System.in);
            double radius = Double.parseDouble(scanner.nextLine());
            Set<Point> set = new HashSet<>();
            Point p = new Point(0, 0);
            //addPoints(set, p);

            System.out.println("0 0");

            while (true) {
                String[] line = scanner.nextLine().split(" ");
                p = new Point(Double.parseDouble(line[0]), Double.parseDouble(line[1]));                
                System.out.println((int) -1*(p.x) +" "+ (int) -1*(p.y));

            }
        } catch (Exception ex) {
        }

    }


    private static void addPoints(Set<Point> set, Point p) {
        set.add(new Point(p.x - 1, p.y - 1));
        set.add(new Point(p.x - 1, p.y + 0));
        set.add(new Point(p.x - 1, p.y + 1));

        set.add(new Point(p.x, p.y - 1));
        set.add(new Point(p.x, p.y + 0));
        set.add(new Point(p.x, p.y + 1));

        set.add(new Point(p.x + 1, p.y - 1));
        set.add(new Point(p.x + 1, p.y + 0));
        set.add(new Point(p.x + 1, p.y + 1));
        //set.add(new Point(p.x + 1, p.y));
    }

    private static Point findNextNumber(double radius, Set<Point> set) {
        for (int i = (int) -(1 * (radius)); i <= radius; i++) {
            for (int j = (int) -(1 * (radius)); j <= radius; j++) {
                Point p = new Point(i, j);
                if (!set.contains(p)) {
                    return p;
                }
            }
        }
        return null;
    }

    private static class Point {

        double x;
        double y;

        public Point(double x, double y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object obj) {
            Point p1 = (Point) obj;
            if ((p1.x == this.x) && (p1.y == this.y)) {
                return true;
            }
            return false;
        }

        @Override
        public int hashCode() {
            return (int) (x * 1000 + y);
        }

    }
}