import java.util.Scanner

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