#include <algorithm>
#include <string.h>
#include <iostream>
#include <stdio.h>

using namespace std;

typedef long long ll;

int main() {
	ll n, m;
	cin >> n >> m;
	for (ll i = n / 2, j = i + 1, k = 1; k <= m; k++, i--, j++) {
		if (n % 2 == 0 && (j - i == n / 2 || j - i == n / 2 + 1)) j++;
		cout << i << ' ' << j << endl;
	}
	return 0;
}