#include <cstdio>
#include <cmath>
#include <iostream>
#include <set>
#include <algorithm>
#include <vector>
#include <map>
#include <cassert>
#include <string>
#include <cstring>
#include <queue>
using namespace std;
#define rep(i,a,b) for(int i = a; i < b; i++)
#define S(x) scanf("%d",&x)
#define S2(x,y) scanf("%d%d",&x,&y)
#define P(x) printf("%d\n",x)
#define all(v) v.begin(),v.end()
#define FF first
#define SS second
#define pb push_back
#define mp make_pair
typedef long long int LL;
typedef pair<int, int > pii;
typedef vector<int > vi;
int main() {
P(1);
int n = 63;
P(n);
rep(i,0,n) {
if(i < 2) printf("1 ");
else if(i < 21) printf("0 ");
else printf("2 ");
}
printf("\n");
rep(i,1,n) {
int x = 2 * i;
if(x <= n) printf("%d %d\n",i,x);
x = 2 * i + 1;
if(x <= n) printf("%d %d\n",i,x);
}
return 0;
}
I2luY2x1ZGUgPGNzdGRpbz4KI2luY2x1ZGUgPGNtYXRoPgojaW5jbHVkZSA8aW9zdHJlYW0+CiNpbmNsdWRlIDxzZXQ+CiNpbmNsdWRlIDxhbGdvcml0aG0+CiNpbmNsdWRlIDx2ZWN0b3I+CiNpbmNsdWRlIDxtYXA+CiNpbmNsdWRlIDxjYXNzZXJ0PgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8Y3N0cmluZz4KI2luY2x1ZGUgPHF1ZXVlPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCiNkZWZpbmUgcmVwKGksYSxiKSBmb3IoaW50IGkgPSBhOyBpIDwgYjsgaSsrKQojZGVmaW5lIFMoeCkgc2NhbmYoIiVkIiwmeCkKI2RlZmluZSBTMih4LHkpIHNjYW5mKCIlZCVkIiwmeCwmeSkKI2RlZmluZSBQKHgpIHByaW50ZigiJWRcbiIseCkKI2RlZmluZSBhbGwodikgdi5iZWdpbigpLHYuZW5kKCkKI2RlZmluZSBGRiBmaXJzdAojZGVmaW5lIFNTIHNlY29uZAojZGVmaW5lIHBiIHB1c2hfYmFjawojZGVmaW5lIG1wIG1ha2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