#include <bits/stdc++.h>
using namespace std;
int main(){
    int n,m;
    scanf("%d%d",&n,&m);
    int O = (m+1)/2;
    int E = m-O;
    for (int i = 1; i <= O; i++){
        printf("%d %d\n",i,2*O+1-i);
    }
    for (int j = 1; j <= E; j++){
        printf("%d %d\n",2*O+j,2*O+2*E+2-j);
    }
}
