#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long inf = 1LL << 50;
const int N = 5000;
long long chooses[N + 1];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin.exceptions(cin.failbit);
  int n, m;
  cin >> n >> m;
  for (long long i = 2; i <= n; i++) {
    chooses[i] = (i * (i - 1)) / 2;
    cout << i << " " << chooses[i] << '\n';
  }
}
