#include <iostream>
using namespace std;
bool bt[100001] = {};
int main()
{
	int n, m; cin >> n >> m;
	int l = 1;
	for (int i = m - (m % 2); i > 0; i -= 2)
	{
		cout << l << " " << l + i << "\n";
		l++;
	}
	int r = n;
	for (int i = m - !(m % 2); i > 0; i -= 2)
	{
		cout << r - i << " " << r << "\n"; 
		r--;
	}
	return 0;
}