#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
using ll = long long;

int main(void){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    int N = 1000, W = 1000;
    cout << N << " " << W << "\n";
    cout << 2000 << " " << 1 << "\n";
    vector<pair<int, int>> a;
    int sum = 2001;
    for(int i = 2;i <= W;i++){
        a.push_back({sum, i});
        sum += 2001;
    }
    reverse(a.begin(), a.end());
    for(auto [v, w] : a){
        cout << v << " " << w << "\n";
    }
    return 0;
}