#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
    int N, M; cin >> N  >> M;
    for (int i = 1; i <= M; i++) {
        ll k = N - i + 1;
        if (N%2 == 0&& (k - i) <= N/2) k--; 
        cout << i << ' ' << k << '\n';
    }
}