#include <cstdio>
#include <algorithm>

using namespace std;

int main()
{
    int n,m;
    scanf("%d %d",&n,&m);
    int odd,even;
    odd=(m+1)/2;
    for(int i=1;i<=odd;i++)
    {
        printf("%d %d\n",i,i+((odd-i+1)*2-1));
    }
    for(int i=1;i<=m-odd;i++)
    {
        printf("%d %d\n",odd*2+i,odd*2+i+(2*(m-odd-i+1)));
    }
    return 0;
}
