macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String {
            bytes
                .by_ref()
                .map(|r| r.unwrap() as char)
                .skip_while(|c| c.is_whitespace())
                .take_while(|c| !c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };

    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, [ $t:tt ]) => {
        {
            let len = read_value!($next, usize);
            (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
        }
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_imports)]
use std::cmp::{min, max};

fn main() {
    input!{
        k: i64,
        x: i64,
        y: i64
    }
    if x.abs() + y.abs() == k {
        println!("1");
        println!("{} {}", x, y);
        return;
    }
    let sx = if x < 0 { -1 } else { 1 };
    let sy = if y < 0 { -1 } else { 1 };
    let mut xa = x.abs();
    let mut ya = y.abs();
    let mut swap = false;
    if ya > xa {
        swap = true;
        xa = y.abs();
        ya = x.abs();
    }
    if k % 2 == 0 && (xa + ya) % 2 == 1{
        println!("-1");
        return;
    }
    let mut s;
    let mut mov = vec![];
    if xa + ya < k {
        if (xa + ya) % 2 == 0 {
            s = 2;
            mov = vec![((xa + ya) / 2, (xa + ya) / 2 - k), (xa, ya)];
        } else {
            s = 3;
            mov = vec![(xa, xa - k), (xa + (k + xa - ya) / 2, (xa + ya - k) / 2), (xa, ya)];
        }
    } else {
        s = (xa + ya - 1) / k + 1;
        if (k * s - xa - ya) % 2 == 1 {
            s += 1;
        }
        let mut rx = k - (s * k - xa - ya) / 2;
        let mut ry = (xa + ya - s * k) / 2;
        mov.push((rx, ry));
        while rx + k <= xa {
            rx += k;
            mov.push((rx, ry));
        }
        ry = ry + k - xa + rx;
        rx = xa;
        mov.push((rx, ry));
        while ry < ya {
            ry += k;
            mov.push((rx, ry));
        }
    }
    println!("{}", s);
    if swap {
        mov = mov.iter().map(|x| (x.1, x.0)).collect();
    }
    for i in 0..s as usize {
        println!("{} {}", sx * mov[i].0, sy * mov[i].1);
    }
}


Measured memory_bytes: 11512