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()

    val even = (m + 1) / 2
    val odd = m - even
    debug(even, odd)

    var oddLeft = 1
    var oddRight = oddLeft + odd * 2
    debug(oddLeft, oddRight)

    var evenLeft = oddRight + 1
    var evenRight = evenLeft + even * 2 - 1
    debug(evenLeft, evenRight)

    while (oddLeft < oddRight) {
      println(s"$oddLeft $oddRight")
      oddLeft += 1
      oddRight -= 1
    }

    while (evenLeft < evenRight) {
      println(s"$evenLeft $evenRight")
      evenLeft += 1
      evenRight -= 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(" "))
  }
}
