#include<stdio.h>
int main(){
  int n,m,num,i,astart=1,bstart;
  scanf("%d%d",&n,&m);
  bstart=n/2+n%2+1;
  num=bstart;
  for(i=0;i<m;i++){
    if(i%2==0){
      printf("%d %d\n",astart,num-astart);
      astart++;
    }
    else{
      if(n%2!=0)
        printf("%d %d\n",bstart,n-bstart+num);
      else
        printf("%d %d\n",bstart,n-bstart+num-1);
      bstart++;
    }
  }
  return 0;
}
