#include <stdio.h>
typedef long long ll;
int main(){
  ll N,M;
  scanf("%lld %lld",&N,&M);
  for(ll i = 0;i<M/2;i++) printf("%lld %lld\n",i+1,M-i);
  if (M & 1) for(ll i = N-M/2-1;i<N;i++) printf("%lld %lld\n",i+1,2*N-i-M/2-1);
  else for(ll i = N-M/2;i<N;i++) printf("%lld %lld\n",i+1,2*N-i-M/2);
  return 0;
}