#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
using namespace std;

int main(){
  int n, m, c = 0; cin >> n >> m;
  rep(i, m){
    int a = i+1, b = n-i-c;
    if(b-a <= n/2 && n % 2 == 0 && c == 0){
      c = 1; --b;
    }
    cout << a << " " << b << "\n";
  }
  return 0;
}
