#include<iostream>
#include<vector>
using namespace std;

int main(){
    int n, m;
    cin >> n >> m;
    vector<int> a(m), b(m);
    for(int i = 1; i <= m; i++) a[i-1] = i;
    for(int i = 1; i <= m; i++) b[i-1] = m+m-i+1;
    if(n%2 == 0){
        for(int i = 0; i < m/2; i++)    b[i]++;
    }
    for(int i = 0; i < m; i++)  cout << a[i] << " " << b[i] << endl;
    return 0;
}