#include <iostream>
using namespace std;
int main()
{
    int k, potrebno = 0, i=0, j=0, tacke=0;
    cin >> k;
    while(potrebno<k)
    {
        while(j<3)
        {
            j++;
            cout << i << " " << j << endl;
            tacke++;
            if(tacke == 3)
            {
                potrebno++;
                tacke=0;
            }
        }
        j=0;
        i++;
    }
    return 0;
}