#include <bits/stdc++.h>

using namespace std;

int main()
{
    srand(time(NULL));
    freopen(".1.in","w", stdout);
    cout<<10<<endl;
    for(int c = 0 ; c < 10 ; c++ )
    {
        cout<<100<<" "<<100<<endl;
        for(int i = 0 ; i < 100 ; i++ )
        {
            for(int j = 0 ; j < 100 ; j++ )
                cout<<rand()%1000+1<<" ";
            cout<<endl;
        }
    }
}
