import kotlin.math.*
fun main(args: Array<String>) {
    var (n, m) = readLine()!!.split(" ").map{it.toLong()}
    if (n%2 == 1L) {
        for (i in 1..m) {
            println("${i} ${n-i+1}") 
        }
    } else {
        for (i in 1..m) {
            if (n-i-i+1 > n/2)
                println("${i} ${n-i+1}")
            else
                println("${i} ${n-i}")
        }
    }
}
