#include <stdio.h>

int main(void){

  long n,m;
  scanf("%ld %ld", &n, &m);
  if (m%2 == 1) {
  	for (long i = 1; i <= m/2; i++) {
  		printf("%ld %ld\n", i, m+1-i);
  	}
		for (long i = 1; i <= (m+1)/2; i++) {
  		printf("%ld %ld\n", m+i, (m+1)*2-i);
  	}
  } else {
		for (long i = 1; i <= m/2; i++) {
			printf("%ld %ld\n", i, m+2-i);
		}
		for (long i = 1; i <= (m+1)/2; i++) {
			printf("%ld %ld\n", m+1+i, (m+1)*2-i);
		}
	}

  return 0;
}