#include <iostream>
#include <vector>
#include <utility>
using namespace std;

int main(){
  int N, M;
  cin >> N >> M;
  vector<pair<int,int>> C;
  for(int i = 0; i < N/4; ++i){
    C.emplace_back(i+1,N/4*2-i);
  }
  for(int i = 0; i < N/2-N/4; ++i){
    C.emplace_back(N/4*2+1+i,N-(1-N%2)-i);
  }
  for(int i = 0; i < M; ++i)
    cout << C[i].first << " " << C[i].second << endl;
}
