#include <stdio.h>

int main(void){

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

  return 0;
}