#include <stdio.h>
#include <stdint.h>
#include <math.h>

int main()
{
  int n, m;
  scanf("%d %d",&n, &m);
  int i = 0;
  int head = 1;
  int tail = n;
  // odd
  for (i = 0; i < m; i+=2) {
    printf("%d %d\n", head++, tail--);
  }
  // even
  head = n/2;
  tail = head+2;
  for (i = 0; i < m/2; i++) {
    printf("%d %d\n", head--, tail++);
  }

  return 0;
}

