#include <stdio.h>

int main()
{
    int n, m;

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