import std;

void calc(int n, int m) {
    int lo = 1;
    int hi = n;
    bool[int] used;
    foreach (i; 0..m) {
        int a = abs(lo - hi);
        int b = n - a;
        if (a == b || a in used || b in used) {
            hi--;
        }

        writeln(lo, " ", hi);
        lo++;
        hi--;
        used[a] = used[b] = true;
    }
}

void main() {
    int n, m; scan(n, m);
    calc(n, m);
}

void scan(T...)(ref T a) {
    string[] ss = readln.split;
    foreach (i, t; T) a[i] = ss[i].to!t;
}
T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;
