#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <map>
#include <algorithm>

#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
using namespace std;

const int INF = 0x3f3f3f3f;
const double EPS = 0.000000001;
const double PI = 3.141592653589793;
const long long LLINF = 99999999999999999LL;
const int MAX_N = 1000002;

int N;
vector < pair < int, int > > points;

pair < double, double > rot(double x, double y, double x2, double y2, double U) {
    x -= x2;
    y -= y2;

    double new_x = x * cos(U) - y * sin(U);
    double new_y = x * sin(U) + y * cos(U);

    new_x += x2;
    new_y += y2;

    return make_pair(new_x, new_y);
}

pair < double, double > sim(double x, double y, double x2, double y2) {
    return make_pair(x2 - x, y2 - y);
}

int main()
{
    /*
    #ifndef ONLINE_JUDGE
        freopen("data.in", "r", stdin);
    #endif
    */

    double R;
    scanf("%lf", &R);

    for(int i = -R + 1; i < R; ++i) {
        for(int j = -R + 1; j < R; ++j) {
            points.push_back(make_pair(i, j));
        }
    }

    int x, y;
    printf("%d %d\n", 0, 0);
    fflush(stdout);
    while(cin >> x >> y) {
        x = -x;
        y = -y;

        printf("%d %d\n", x, y);
        fflush(stdout);
    }

    return 0;
}