// #define DEBUGGING
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ALL(V) (V).begin(), (V).end()
#define ALLR(V) (V).rbegin(), (V).rend()

template <typename T> using V = vector<T>;
template <typename T> using VV = V<V<T>>;
using ll = int64_t;
using ull = uint64_t;
using PLL = pair<ll, ll>;

template <typename T> const T& var_min(const T &t) { return t; }
template <typename T> const T& var_max(const T &t) { return t; }
template <typename T, typename... Tail> const T& var_min(const T &t, const Tail&... tail) { return min(t, var_min(tail...)); }
template <typename T, typename... Tail> const T& var_max(const T &t, const Tail&... tail) { return max(t, var_max(tail...)); }
template <typename T, typename... Tail> void chmin(T &t, const Tail&... tail) { t = var_min(t, tail...); }
template <typename T, typename... Tail> void chmax(T &t, const Tail&... tail) { t = var_max(t, tail...); }
template <typename T> const T& clamp(const T &t, const T &low, const T &high) { return max(low, min(high, t)); }
template <typename T> void chclamp(T &t, const T &low, const T &high) { t = clamp(t, low, high); }

namespace init__ {

struct InitIO {
    InitIO() {
        cin.tie(nullptr);
        ios_base::sync_with_stdio(false);
        cout << fixed << setprecision(30);
    }
} init_io;

}

#ifdef DEBUGGING
// #include "../debug/debug.cpp"
#include "../../debug/debug.cpp"
#else
#define DEBUG(...) 0
#define DEBUG_SEPARATOR_LINE 0
#endif

template <typename T>
T make_v(T init) { return init; }

template <typename T, typename... Tail>
auto make_v(T init, size_t s, Tail... tail) {
#define rec make_v(init, tail...)
    return V<decltype(rec)>(s, rec);
#undef rec
}

V<PLL> ans;

void simulate(ll cur_x, ll cur_y, ll X, ll Y, ll K) {
    while(cur_x < X || cur_y < Y) {
        ll rest = K;
        if(cur_x < X) {
            ll adv = min(rest, X - cur_x);
            cur_x += adv;
            rest -= adv;
        }
        if(cur_y < Y) cur_y += rest;
        ans.emplace_back(cur_x, cur_y);
    }
}

ll solve() {
    ll K, X, Y;
    cin >> K >> X >> Y;
    bool xm = X < 0;
    bool ym = Y < 0;
    X = abs(X);
    Y = abs(Y);
    bool swaped = X < Y;
    if(swaped) swap(X, Y);
    ll sum = X + Y;
    ll mod = (K - (X + Y) % K) % K;
    if(mod % 2 == 1 && K % 2 == 0) return -1;
    do {
        if(mod == 0) {
            simulate(0, 0, X, Y, K);
            break;
        }

        bool ok = false;

        do {
            if(mod % 2 == 0) {
                ll cur_y = -mod / 2;
                ll cur_x = K - mod / 2;
                if(X < cur_x) break;
                ok = true;
                ans.emplace_back(cur_x, cur_y);
                simulate(cur_x, cur_y, X, Y, K);
            }
        } while(false);

        if(ok) break;
        
        do {
            if(mod % 2 == K % 2) {
                ll over = (K - mod) / 2;
                ll cur_y = -(over + mod);
                ll cur_x = K - (over + mod);
                if(X < cur_x) break;
                ok = true;
                ans.emplace_back(cur_x, cur_y);
                simulate(cur_x, cur_y, X, Y, K);
            }
        } while(false);

        if(ok) break;

        ll over = (2 * K - mod) / 2;
        simulate(0, 0, X, Y + mod, K);
        ans.emplace_back(X + over, Y + mod - (K - over));
        ans.emplace_back(X, Y);
    } while(false);
    
    for(auto &&ele : ans) {
        if(swaped) swap(ele.first, ele.second);
        if(xm) ele.first *= -1;
        if(ym) ele.second *= -1;
    }
    return ans.size();
}

int main() {
    ll ret = solve();
    cout << ret << endl;
    for(ssize_t i = 0; i < ret; i++) {
        ll x, y;
        tie(x, y) = ans[i];
        cout << x << ' ' << y << endl;
    }
    return 0;
}


Measured memory_bytes: 5744