#include <iostream>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    int n, m;
    cin >> n >> m;
    for (int i = 1; i <= m; ++i)
        cout << i << " " << 2 * m + 1 - i << endl;
    return 0;
}
