/**
* Author: Sergey Kopeliovich (Burunduk30@gmail.com)
* Date: 2013.04.14
*/
#include <cstdio>
#include <cstdlib>
#include <vector>
using namespace std;
#define forn(i, n) for (int i = 0; i < (int)(n); i++)
#define pb push_back
const int maxN = (int)1e4 + 10;
const int maxC = (int)1e4;
int wa[maxN], wb[maxN];
vector <int> a, b;
void addE( int x, int y ) { a.pb(x), b.pb(y); }
int main( int argc, char *argv[] )
{
if (argc < 2)
{
puts("Usage: <n>");
return 1;
}
int n = atoi(argv[1]);
forn(i, n)
addE(i, i);
forn(i, n - 1)
addE(i, i + 1);
int p0 = n / 2, p1 = n / 2, c = maxC;
forn(i, n)
{
if (i & 1)
wa[p0] = c, wb[p1] = c;
else
wb[p0++] = c, wa[p1--] = c;
c--;
}
printf("%d %d %d\n", n, n, a.size());
forn(i, n)
printf("%d%c", wa[i], " \n"[i == n - 1]);
forn(i, n)
printf("%d%c", wb[i], " \n"[i == n - 1]);
forn(i, a.size())
printf("%d %d\n", a[i] + 1, b[i] + 1);
return 0;
}