#include <bits/stdc++.h>

using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    long long k, x, y;
    cin >> k >> x >> y;
    // if current dist is d we can get to any dist from the interval:
    //  [abs(d-k), d+k]
    // that has parity d+k.
    // So say we can reach an interval [l, r].
    // Now if l, r < k then we can reach:
    //  [k-r, r+k]
    // If l <= k <= r then we can reach:
    //  [0, r+k]
    // if k < l, r then we can reach:
    //  [l-k, r+k]
    // We can simplify this as: If r < k:
    //  [k-r, r+k]
    // Otherwise:
    //  [max(l-k, 0), r+k]
    // (Still we have to consider the parity issue)
    // Now for the classification:
    // d = k: 1 step
    // d < k: 2 steps if k is even. 3 steps if k is odd and x+y is odd.
    // k < d <= 2k:
    //  [d, d] -> [d-k, d+k] -> [0, d+2k]
    //  so again 2 steps if k is even. 3 steps if k is odd and x+y is odd.
    // ik < d <= (i+1)k
    //  [d, d] -> [d-k, d+k] -> [d-2k, d+2k] -> ... -> [d-ik, d+ik] -> [0, d+(i+1)k]
    //  so i+1 steps unless k is odd in which case we need an extra step if i+1 and x+y have different parities.
    if (k % 2 == 0 && (x+y) % 2 != 0) {
        cout << -1 << endl;
        return 0;
    }
    long long x0 = 0, y0 = 0;
    auto dist = [&]() {
        return abs(x-x0) + abs(y-y0);
    };
    vector<pair<long long, long long>> moves;
    auto move_to = [&](long long x1, long long y1) {
        x0 = x1;
        y0 = y1;
        moves.push_back(make_pair(x1, y1));
    };
    auto move_to_dist = [&](long long new_dist) {
        // only works for new_dist >= k and if reachable.
        // (x0+k, y0)
    };
    while (dist() != 0) {
        if (dist() == k) {
            move_to(x, y);
            continue;
        } else if (dist() >= 2*k) {
            if (abs(x-x0) >= k) {
                if (x0 > x) {
                    move_to(x0-k, y0);
                } else {
                    move_to(x0+k, y0);
                }
            } else {
                if (y0 > y) {
                    move_to(x0, y0-k);
                } else {
                    move_to(x0, y0+k);
                }
            }
        } else {
            long long x1 = x0, y1 = y0;
            if (abs(x0-x) > abs(y0-y)) {
                if (x0 > x) {
                    x1 = x0 - k;
                } else {
                    x1 = x0 + k;
                }
            } else {
                if (y0 > y) {
                    y1 = y0 - k;
                } else {
                    y1 = y0 + k;
                }
            }
            long long x2 = x0, y2 = y0;
            if (x1 != x0) {
                y2 += y0 > y ? k : -k;
            } else {
                x2 += x0 > x ? k : -k;
            }
            if (abs(x1-x) + abs(y1-y) >= k && abs(x1-x) + abs(y1-y) <= k+1) {
                move_to(x1, y1);
                continue;
            }
            if (abs(x2-x) + abs(y2-y) >= k && abs(x2-x) + abs(y2-y) <= k+1) {
                move_to(x2, y2);
                continue;
            }
            int dx = (x2-x1) / k;
            int dy = (y2-y1) / k;
            int lo = 1;
            int hi = k-1;
            bool moved = false;
            while (!moved) {
                int mid = (lo + hi)/2;
                long long x3 = x1 + dx * mid, y3 = y1 + dy * mid;
                long long d3 = abs(x3-x) + abs(y3-y);
                if (k <= d3 && d3 <= k+1) {
                    move_to(x3, y3);
                    moved = true;
                } else {
                    if (d3 < k) {
                        lo = mid+1;
                    } else {
                        hi = mid-1;
                    }
                }
            }
            assert(moved);
        }
    }
    cout << moves.size() << endl;
    for (auto move : moves) {
        cout << move.first << " " << move.second << "\n";
    }
    return 0;
}


Measured memory_bytes: 5484