#include <cstdio>

int main(void)
{
    int n, m, f, e;

    scanf("%d %d", &n, &m);

    for (f = 1, e = m; f < e; f++, e--)
        printf("%d %d\n", f, e);
    for (f = m + 1, e = 2 * m + 1; f < e; f++, e--)
        printf("%d %d\n", f, e);
    return 0;
}