const input = require("fs").readFileSync("/dev/stdin", "utf8")
const lines = input.split('\n')
const [N, M] = lines[0].split(' ').map(Number)

let e = N - N % 2
for (let i = 0; i < M; i++) {
    const d1 = (e - i) - (i + 1)
    const d2 = i + 1 + N - e + i
    if (d1 === d2) e--
    console.log(`${i + 1} ${e - i}`)
}