fn main() {
    let (r, w) = (std::io::stdin(), std::io::stdout());
    let mut sc = IO::new(r.lock(), w.lock());
    let k: i64 = sc.read();
    let x: i64 = sc.read();
    let y: i64 = sc.read();
    if (x + y).abs() % 2 == 1 && k % 2 == 0 {
        println!("-1");
        return;
    }

    let (x, x_neg) = if x < 0 { (-x, true) } else { (x, false) };
    let (y, y_neg) = if y < 0 { (-y, true) } else { (y, false) };
    let (x, y, xy_swap) = if x > y { (y, x, true) } else { (x, y, false) };

    let ans = solve(x, y, k);
    println!("{}", ans.len());
    for (x, y) in ans.into_iter() {
        let (x, y) = if xy_swap { (y, x) } else { (x, y) };
        let x = if x_neg { -x } else { x };
        let y = if y_neg { -y } else { y };
        println!("{} {}", x, y);
    }
}

fn solve(x: i64, y: i64, k: i64) -> Vec<(i64, i64)> {
    if (x + y) % k == 0 {
        let mut ans = vec![];
        let mut cur_x = 0;
        let mut cur_y = 0;
        while cur_x < x || cur_y < y {
            if cur_x < x {
                let d = x - cur_x;
                if d >= k {
                    cur_x += k;
                } else {
                    cur_x += d;
                    cur_y += k - d;
                }
            } else {
                cur_y += k;
            }

            ans.push((cur_x, cur_y));
        }
        return ans;
    }

    let from = (x + y + k - 1) / k;
    for n in from.. {
        let total = k * n;
        let d = total - (x + y);
        if d % 2 != 0 {
            continue;
        }
        let s = d / 2;

        if s % k + y < k && s <= k {
            continue;
        }

        let (s, t) = if s > k { (s - k, k) } else { (s, 0) };

        let mut ans = vec![];
        if t > 0 {
            ans.push((0, -t));
        }
        let mut cur_x = 0;
        let mut cur_y = -t;
        loop {
            if cur_x < x + s {
                let d = x + s - cur_x;
                if d >= k {
                    cur_x += k;
                } else {
                    cur_x += d;
                    cur_y += k - d;
                }
            } else {
                let d = y - cur_y;
                if d < k {
                    break;
                }
                cur_y += k;
            }
            ans.push((cur_x, cur_y));
        }

        while cur_x > x || cur_y < y {
            if cur_y < y {
                let d = y - cur_y;
                assert!(d < k);
                cur_y += d;
                cur_x -= k - d;
            } else {
                cur_x -= k;
            }
            ans.push((cur_x, cur_y));
        }

        return ans;
    }
    unreachable!()
}

pub struct IO<R, W: std::io::Write>(R, std::io::BufWriter<W>);

impl<R: std::io::Read, W: std::io::Write> IO<R, W> {
    pub fn new(r: R, w: W) -> Self {
        Self(r, std::io::BufWriter::new(w))
    }
    pub fn write<S: ToString>(&mut self, s: S) {
        use std::io::Write;
        self.1.write_all(s.to_string().as_bytes()).unwrap();
    }
    pub fn read<T: std::str::FromStr>(&mut self) -> T {
        use std::io::Read;
        let buf = self
            .0
            .by_ref()
            .bytes()
            .map(|b| b.unwrap())
            .skip_while(|&b| b == b' ' || b == b'\n' || b == b'\r' || b == b'\t')
            .take_while(|&b| b != b' ' && b != b'\n' && b != b'\r' && b != b'\t')
            .collect::<Vec<_>>();
        unsafe { std::str::from_utf8_unchecked(&buf) }
            .parse()
            .ok()
            .expect("Parse error.")
    }
    pub fn vec<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read()).collect()
    }
    pub fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
}


Measured memory_bytes: 5680