import scala.collection.mutable
import scala.io.StdIn

object Main extends App {

  val (n, m) = readIntPair
  val (l, r) = (1 to n).splitAt((n-1) / 2)
  val first = if (n % 2 == 1) m else m - 1
  var set = new mutable.TreeSet[Int]()
  (1 to n).foreach(set += _)

  for (i <- 1 to m) {
    val f = set.head
    val s = (n - i + 1)
    set -= f
    set -= s
    println(s"$f $s")
  }

//  l.reverse.take(first).zip(r).foreach { case (x , y) =>
//    println(s"$x $y")
//  }

//  if (n % 2 == 0)
//    println(s"1 ${n-1}")


  def readIntPair: (Int, Int) = {
    val Array(x, y) = StdIn.readLine().split(" ").map(_.toInt)
    (x, y)
  }

  def readIntArr = StdIn.readLine().split(" ").map(_.toInt)
}

//1 2 3 4 5 6 7 8 9 10




