import java.util.Scanner

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

    val n, m = sc.nextInt()

    var a = 1
    var b = m * 2

    println(s"$a ${b + 1}")
    a += 1
    b -= 1

    for (_ <- 1 until m) {
      println(s"$a $b")
      a += 1
      b -= 1
    }
  }

  @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(" "))
  }
}
