import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    //nextLineとnextを同時に使ったら死ぬ
    val sc = new Scanner(System.in)

    val n, m = sc.nextLong()

    var a = 1L
    var b = n

    if ((n - m * 2) % 2 == 1) {
      for (_ <- 1L to m) {
        println(s"$a $b")
        a += 1L
        b -= 1L
      }
    } else {
      println(s"$a $b")
      a += 2
      b -= 1
      for (_ <- 1L until m) {
        println(s"$a $b")
      }
    }

//    if ((n - m * 2) % 2 == 1) {
//      for (_ <- 0L until m) {
//        println(s"$a $b")
//        a -= 1L
//        b += 1L
//      }
//    } else {
//      b+=1
//      for ()
//    }
  }

  @scala.annotation.tailrec
  def gcd(a: Int, b: Int): Int = {
    if (b == 0) a else gcd(b, a % b)
  }
  def debug(args: Any*): Unit = {
    Console.err.println(args.mkString(" "))
  }
}
