-- https://github.com/minoki/my-atcoder-solutions
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE BangPatterns #-}
import Data.Char (isSpace)
import Data.Int (Int64)
import Data.List (unfoldr)
import Control.Monad
import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Unboxed.Mutable as UM
import qualified Data.ByteString.Char8 as BS
import Data.Bifunctor
import Control.Exception

-- d <= 2 * k && x >= 0 && y >= 0
solveSmall :: Int -> Int -> Int -> [(Int,Int)]
solveSmall !k !x !y
  | assert (x >= 0 && y >= 0 && d <= 2 * k) False = undefined
  | d == 0 = []
  | d == k = [(x,y)]
  | odd k && odd (x + y) = let !x1 = -1
                               !y1 = 1-k
                           in (x1,y1) : map (bimap (+ x1) (+ y1)) (solveSmall k (x-x1) (y-y1))
  | otherwise {- even k || even (x + y) -} =
      if x > y
      then let !x1 = (x+1) `quot` 2
               !y1 = x1-k
           in [(x1,y1), (x,y)]
      else let !y1 = (y+1) `quot` 2
               !x1 = y1-k
           in [(x1,y1), (x,y)]
  where d = abs x + abs y -- <= 2 * k

-- x >= 0 && y >= 0
solve :: Int -> Int -> Int -> [(Int,Int)]
solve !k !x !y
  | d < 2 * k = solveSmall k x y
  | x >= k = let (q,r) = (x - k) `quotRem` k
                 xs0 = [(i*k,0) | i <- [1..q]]
                 (q',r') = (y - k + r) `quotRem` k
                 xs1 = [(x,k-r+j*k) | j <- [1..q']]
             in xs0 ++ xs1 ++ map (bimap (+ x) (+ (y-r'))) (solveSmall k 0 r')
  | otherwise {- y >= k -} =
    let (q,r) = (y - k) `quotRem` k
        xs0 = [(0,i*k) | i <- [1..q]]
        (q',r') = (x - k + r) `quotRem` k
        xs1 = [(k-r+j*k,y) | j <- [1..q']]
    in xs0 ++ xs1 ++ map (bimap (+ (x-r')) (+ y)) (solveSmall k r' 0)
  where d = abs x + abs y

main = do
  k <- readLn
  [x,y] <- unfoldr (BS.readInt . BS.dropWhile isSpace) <$> BS.getLine
  if k >= 2 && even k && odd (x + y)
    then putStrLn "-1"
    else do let xs = solve k (abs x) (abs y)
                ys | x < 0 && y < 0 = map (bimap negate negate) xs
                   | x < 0 = map (first negate) xs
                   | y < 0 = map (second negate) xs
                   | otherwise = xs
            print $ length ys
            forM_ ys $ \(x',y') -> putStrLn $ unwords [show x', show y']
