// Words are flowing out like endless rain into a paper cup
// They slither while they pass they slip away across the universe
// Pools of sorrow, waves of joy are drifting through my open mind
// Possessing and caressing me

#include <bits/stdc++.h>
using namespace std;

using LL = long long;

namespace _buff {

const size_t BUFF = 1 << 19;
char ibuf[BUFF], *ib = ibuf, *ie = ibuf;
char getc() {
    if (ib == ie) {
        ib = ibuf;
        ie = ibuf + fread(ibuf, 1, BUFF, stdin);
    }
    return ib == ie ? -1 : *ib++;
}

}

LL read() {
    using namespace _buff;
    LL ret = 0;
    bool pos = true;
    char c = getc();
    for (; (c < '0' || c > '9') && c != '-'; c = getc()) {
        assert(~c);
    }
    if (c == '-') {
        pos = false;
        c = getc();
    }
    for (; c >= '0' && c <= '9'; c = getc()) {
        ret = (ret << 3) + (ret << 1) + (c ^ 48);
    }
    return pos ? ret : -ret;
}

int main() {
    LL k = read();
    LL x = read();
    LL y = read();
    LL mulx = x < 0 ? (x = -x, -1) : 1;
    LL muly = y < 0 ? (y = -y, -1) : 1;

    LL sum = x + y;
    LL extra = (k - sum % k) % k;
    if ((extra & 1) && (k & 1)) {
        extra += k;
    }
    if (extra & 1) {
        puts("-1");
        return 0;
    }
    extra >>= 1;

    vector<pair<LL, LL> > ans;
    auto doit = [&]() {
        for (int i = 0; i < 2; ++i) {
            for (int j = 0; j < 2; ++j) {
                vector<pair<LL, LL> > vc;
                LL cx = 0, cy = 0;
                if (extra) {
                    cx -= extra;
                    cy += k - extra;
                    vc.emplace_back(cx, cy);
                }
                if (j) {
                    while (cx + k <= x) {
                        cx += k;
                        vc.emplace_back(cx, cy);
                    }
                    if (cx < x) {
                        LL tmp = x - cx;
                        cx += tmp;
                        cy += k - tmp;
                        vc.emplace_back(cx, cy);
                    }
                } else {
                    while (cx < x) {
                        cx += k;
                        vc.emplace_back(cx, cy);
                    }
                    if (cx > x) {
                        LL tmp = cx - x;
                        cx -= tmp;
                        cy -= k - tmp;
                        vc.emplace_back(cx, cy);
                    }
                }
                while (cy + k <= y) {
                    cy += k;
                    vc.emplace_back(cx, cy);
                }
                while (cy - k >= y) {
                    cy -= k;
                    vc.emplace_back(cx, cy);
                }
                if (i) {
                    for (auto &pr : vc) {
                        swap(pr.first, pr.second);
                    }
                }
                if (ans.empty() || vc.size() < ans.size()) {
                    ans = vc;
                }
            }
            swap(x, y);
        }
    };

    doit();
    if (!(k & 1)) {
        extra += k >> 1;
        doit();
    }

    int n;
    if (x + y < k && (x + y) & 1) {
        n = 3;
    } else if (x + y < k) {
        n = 2;
    } else {
        n = (x + y + k - 1) / k;
        if ((n * k - x - y) & 1) {
            ++n;
        }
    }
    cerr << n << ' ' << ans.size() << '\n';
    assert(n == ans.size());
    printf("%lu\n", ans.size());
    LL sx = 0, sy = 0;
    for (auto &pr : ans) {
        LL x = pr.first;
        LL y = pr.second;
        assert(abs(x - sx) + abs(y - sy) == k);
        sx = x; sy = y;
        printf("%lld %lld\n", x * mulx, y * muly);
    }
    assert(x == sx && y == sy);

    return 0;
}

Measured memory_bytes: 10616