5
5 3
2 4
3 1
4 5
 4
2 4
3 2
2 1
 5
5 3
2 4
3 1
4 5
 2
1 2
 4
3 4
2 3
3 1
 10
8 10
2 9
7 8
4 1
7 3
4 7
2 5
2 4
4 6
 5
3 4
3 2
3 1
1 5
 3
1 2
2 3
 5
1 2
1 3
1 4
1 5

1 2
2 3
2 4
 1 3
2 4
3 5
4 5
 1 2
 1 3
2 3
3 4
 1 4
2 4
2 5
2 9
3 7
4 6
4 7
7 8
8 10
 1 3
1 5
2 3
3 4
 1 2
2 3
 1 2
1 3
1 4
1 5

#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int Mxn = 2e3 + 1;
vector<int> vis(Mxn);
map<int, set<int>> edge;
int n, query;
void solve() {
  cin >> n;
  query = (n + 1) / 2;
  int in = 1;
  cout << "1 2" << '\n';
  return;
  while (query && in < n + 1) {
    cout << "? " << in << '\n';
    fflush(stdout);
    vis[in] = 1;
    unordered_map<int, vector<int>> mp;
    for (int i = 1; i <= n; i++) {
      int x;
      cin >> x;
      mp[x].push_back(i);
    }
    cout << '\n';
    for (int dist = 1; mp.find(dist) != mp.end(); dist++) {
      if (mp[dist - 1].size() == 1) {
        vis[dist - 1] = 1;
        for (int u : mp[dist]) {
          edge[mp[dist - 1][0]].insert(u);
          vis[u] = 1;
        }
      }
    }
    while (in <= n && vis[in]) in++;
  }
  cout << "!" << '\n';
  for (int i = 1; i <= n; ++i) {
    set<int> st;
    for (int j : edge[i]) {
      st.insert(j);
    }
    for (int j : st) {
      cout << i << " " << j << '\n';
    }
  }
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
}
