#include <iostream>
using namespace std;

typedef long long ll;

int main () {
	int M, N;
	cin >> N >> M;
	if (N%2) {
		for (int i=1; i<=M; i++)
			cout << i << " " << 2*M+1-i << endl;
	} else {
		int i=1;
		while (i<=M/2) {
			cout << i << " " << 2*M+2-i << endl;
			i++;
		}
		while (i<=M) {
			cout << i << " " << 2*M+1-i << endl;
			i++;
		}
	}
	return 0;
}