#include<stdio.h>

int main(){
  int N,M,i;
  int a_i;
  int b_i;
  int bs;
  int flag=0;
     
  scanf("%d %d",&N,&M);
  bs=N+1;
  
  if(N%2==1){
    for(i=1;i<=M;i++){
      a_i=i;
      b_i=bs-1;
      bs=bs-1;
    printf("%d %d\n",a_i,b_i);
    }
  } else {
      for(i=1;i<=M;i++){
	  a_i=i;
        if(i==(M+3)/2 && flag==0){
          bs=bs-1;
          flag=1;
        }
      b_i=bs-1;
      bs=bs-1;
    printf("%d %d\n",a_i,b_i);
    }
  }
  
 return 0; 
}