#include <bits/stdc++.h>
using namespace std;

int main() {
    freopen("plant.in","r",stdin);
    freopen("plant.out","w",stdout);
    short T,id;
    cin>>T>>id;
    if(id==1) {
        for(int i=0; i<T; ++i)
            cout<<"0 0\n";
        return 0;
    }
    else if(id==15) {
        for(int i=0; i<T; ++i)
            cout<<"114514 0\n";
        return 0;
    }
    else {
        for(int i=0; i<T; ++i)
            cout<<"114 514\n";
        return 0;
    }
    return 0;
}
