#include <iostream>

using namespace std;

int main()
{
    int k;
    cin>>k;
    int x=0, y=0;
    for (int i=0; i<k; i++)
    {
        cout<<x<<" "<<y<<endl;
        x++;
        cout<<x<<" "<<y<<endl;
        x++;
        cout<<x<<" "<<y<<endl;
        y++;
        x+=2;
    }
}