import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)
  val (n, m) = (sc.nextInt(), sc.nextInt())
  val odd = m / 2 + m % 2
  val even = m / 2
  val result = (1 to odd).map { i => (i, odd * 2 - i + 1) } ++
      (1 to even).map { i => (i + odd * 2, odd * 2 + even * 2 - i + 2)}
  result.map { case (x, y) => s"${x} ${y}" }.foreach(println)
}
