#include <bits/stdc++.h>
// #include <atcoder/all>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define srep(i,s,t) for(int i = s; i < t; ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
using namespace std;
// using namespace atcoder;
typedef long long int ll;
typedef pair<int,int> P;
#define yn {puts("Yes");}else{puts("No");}
#define MAX_N 200005

int main() {
    int n;
    cin >> n;
    int a[n+1], b[n+1];
    srep(i,1,n+1){
        a[i] = i * 2 % n;
        b[i] = (i*2+1) % n;
        if(a[i] == 0) a[i] = n;
        if(b[i] == 0) b[i] = n;
    }

    srep(i,1,n+1) cout << a[i] << ' ' << b[i] << endl;

    return 0;
}



#include <bits/stdc++.h>
#define LL long long
#define pb push_back
#define st first
#define nd second
#define INF 0x3f3f3f3f
#define LINF 0x3f3f3f3f3f3f3f3f
template <class T> T read(T &a) {
    a=0;char x=getchar();bool f=0;
    for(;x<'0'||x>'9';x=getchar())f|=x=='-';
	for(;x>='0'&&x<='9';x=getchar())a=(a<<3)+(a<<1)+x-'0';
    if(f)a=-a;
    return a;
}
using namespace std;

int main() {
	int n;
	read(n);
	for (int i = 1; i <= n; ++i) {
		int x = i * 2, y = i * 2 + 1;
		while (x > n) x -= n;
		while (y > n) y -= n;
		printf("%d %d\n", x, y);
	}
    return 0;
}
