#include<stdio.h>

int main(void){
    register int i;
    int m,n;
    scanf("%d%d",&n,&m);
    int c = n/2;
    for(i = 0;i < m;i++){
        printf("%d %d\n",c-i - (i > (c+1)/2?1:0),c+i+1);
    }
}