#include<stdio.h>

int main(void){
  int N,M,p,i;
  int a[5000000],b[5000000];
  scanf("%d %d\n",&N,&M );
  p = N /2;
  for(i=0; i<M; i++){
    a[i] = p -i;
    b[i] = p+1 +i;
    if(b[i] == N+1) b[i] = 1;
  }
  for(i=0; i<M; i++) printf("%d %d\n",a[i],b[i] );
  return 0;
}