#include "bits/stdc++.h"

using namespace std;
using ll = long long;
using indx = size_t;

int main() {
    int n, m;
    cin >> n >> m;
    ll a = n/2;
    ll b = a + 1;
    while(m) {
        m--;
        if (n == 2*(b-a) or n == 2*(b-a-1))
            b++;
        cout << a << " " << b << endl;
        a--, b++;
    }
}
