//~ while (clock()<=69*CLOCKS_PER_SEC)
//~ #pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("O3")
//~ #pragma GCC target ("avx2")
//~ #pragma GCC optimize("Ofast")
//~ #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//~ #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

template <typename T>
using ordered_set =
    tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

#define shandom_ruffle random_shuffle

using ll=long long;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
using vi=vector<int>;
using vll=vector<ll>;
const int nax=1000*1007;

int n;

int fix(int v)
{
	while(v>n)
		v-=n;
	return v;
}

int main()
{
	scanf("%d", &n);
	for (int i=1; i<=n; i++)
	{
		int a=2*i;
		int b=2*i+1;
		a=fix(a);
		b=fix(b);
		printf("%d %d\n", a, b);
	}
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  if(n==2){
     cout<<1<<" "<<2<<endl;
     cout<<1<<" "<<2<<endl;
  }else{
  for(int i=1;i<=n;i++){
     if(i==1){
        cout<<1<<" "<<n/2+1<<endl;
     }else if(i==n){
        cout<<n/2+1<<" "<<n<<endl;
     }else{
        if(i!=2){
        cout<<(i+1)/2<<" "<<i+(n+1-i)/2<<endl;
        }else{
           cout<<1<<" "<<i+(n+1-i)/2<<endl;
        }
     }
  }
}
}