#include <cstdio>
#include <algorithm>
#include <cmath>
#include <iostream>

using namespace std;



int main()
{
    long long a;
    cin>>a;
    long long arh = 0;
    long long s = 1;
    long long skok = 1;
    long long udalj = 3;
    long long j = 4;
    cout<<"1 1"<<endl<<"1 2"<<endl<<"1 3"<<endl;
    for(long long i = 4; 0<1; i++)
    {
        if(arh+(s*j)/(j-3)>a || arh==a || arh+(s*j)/(j-3)==a || arh + s ==a)
        {
        if(arh==a) break;
        if(arh+s==a) break;
        if(arh+(s*j)/(j-3)>a)
        {
            arh+=s+1;
            s=1;
            skok++;
            cout<<skok<<" "<<i<<endl;
            i++;
            cout<<skok<<" "<<i<<endl;
            i++;
            cout<<skok<<" "<<i<<endl;
            i++;
            j=4;
            //cout<<"oo "<<s<<" "<<arh<<" oo"<<endl;
        }
        if(arh==a) break;
        if(arh+(s*j)/(j-3)==a)
        {
            cout<<skok<<" "<<i<<endl;
            break;
        }

        }
        else
        {
        s*=j;
        s/=j-3;
        cout<<skok<<" "<<i<<endl;
        j++;
        cout<<"oo "<<s<<" "<<arh<<" oo"<<endl;
        }

    }










    return 0;
}