#include <bits/stdc++.h>
using namespace std;
long long N,M;

int main(){
  cin >> N >> M;
  if(N%2 == 1){
    for(long long i = 1; i <= M; i++){
      cout << i << " " << 2*M+1-i << endl;
    }
  }else{
    for(long long i = 1; i <= M; i++){
      if(i <= N/4){
        cout << i << " " << N+1-i << endl;
      }
      else{
        cout << i << " " << N-i << endl;
      }
    }
  }
}