import java.lang.Math.*

operator fun Int.plus(other: Boolean) = this + if (other) 1 else 0

fun main(args: Array<String>) {
  val k = readLine()!!.toInt()
  var (x, y) = readLine()!!.split(" ").map { it.toInt() }

  if (k % 2 == 0 && abs(x + y) % 2 == 1) {
    println(-1)
    return
  }
  if (abs(x) + abs(y) == k) {
    println(1)
    println("${x} ${y}")
    return
  }

  val f = (x < y)
  if (x < y) run { val tmp = x; x = y; y = tmp }

  val (gu, gv) = arrayOf(x - y, x + y)
  var s = arrayOf((abs(gu) + k - 1) / k, (abs(gv) + k - 1) / k).max()!!
  if (s == 1) s += (gu < k || gv < k)
  if (k % 2 == 1 && s % 2 != gu % 2) s++
  println(s)

  var (u, v) = arrayOf(0, 0)
  for (i in 1..s) {
    val du = if (u < gu) 1 else -1
    val dv = if (v < gv) 1 else -1
    if (i == s) {
      u += du * k
      v = gv
    } else if (i == s - 1) {
      u = gu - du * k
      v += dv * k
    } else {
      u += du * k
      v += dv * k
    }

    x = (v + u) / 2
    y = (v - u) / 2
    if (f) {
      println("${y} ${x}")
    } else {
      println("${x} ${y}")
    }
  }
}
