#include "bits/stdc++.h"
#define _overload3(_1,_2,_3,name,...)name
#define _rep(i,n)repi(i,0,n)
#define repi(i,a,b)for(int i=int(a),i##_len=(b);i<i##_len;++i)
#define MSVC_UNKO(x)x
#define rep(...)MSVC_UNKO(_overload3(__VA_ARGS__,repi,_rep,_rep)(__VA_ARGS__))
#define all(c)c.begin(),c.end()
#define write(x)cout<<(x)<<'\n'
using namespace std; typedef long long ll; template<class T>using vv = vector<vector<T>>;
template<class T>auto vvec(int n, int m, T v) { return vv<T>(n, vector<T>(m, v)); }
constexpr int INF = 1 << 29, MOD = int(1e9) + 7; constexpr ll LINF = 1LL << 60;
struct aaa { aaa() { cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(10); }; }aaaa;

ll K, X, Y;
ll U, V;
vector<pair<ll, ll>> uvmove;

int main() {
    cin >> K >> X >> Y;
    if (abs(X + Y) % 2 == 1 && K % 2 == 0) {
        write(-1);
        return 0;
    }

    U = X + Y, V = X - Y;
    bool Urev = false, Vrev = false, UVswap = false;
    if (U < 0) U *= -1, Urev = true;
    if (V < 0) V *= -1, Vrev = true;
    if (U < V) swap(U, V), UVswap = true;
    uvmove.emplace_back(0, 0);

    if (K % 2 == 0) {
        if (U < K) {
            uvmove.emplace_back(U - K, K);
            uvmove.emplace_back(U, V);
        }
        else {
            if (U % K != 0) {
                uvmove.emplace_back(U % K, K);
            }
            ll N = U / K;
            if (V >= K) {
                rep(i, N) {
                    ll u = uvmove.back().first + K, v = min(V, uvmove.back().second + K);
                    uvmove.emplace_back(u, v);
                }
            }
            else {
                rep(i, N) {
                    ll u = uvmove.back().first + K, v = V;
                    uvmove.emplace_back(u, v);
                }
            }
        }
    }
    else if (U < K && U % 2 == 0) {
        uvmove.emplace_back(U - K, K);
        uvmove.emplace_back(U, V);
    }
    else if (U < K && U % 2 == 1) {
        uvmove.emplace_back(K, V);
        uvmove.emplace_back(U + 1, V + K);
        uvmove.emplace_back(U, V);
    }    
    else {
        ll N = U / K;
        rep(i, N - 1) {
            ll u = uvmove.back().first + K;
            ll vnow = uvmove.back().second;
            ll v = vnow;
            if (vnow == V - 1) v = V;
            else if (vnow == V) v = V - 1;
            else if (vnow + K <= V) v = vnow + K;
            else if ((V - vnow) % 2 == 1) v = V;
            else v = V - 1;
            uvmove.emplace_back(u, v);
        }
        ll P = uvmove.back().first, Q = uvmove.back().second;
        ll R = U - P, S = V - Q;
        if (R % 2 == 0) {
            uvmove.emplace_back(R - K + P, K + Q);
            uvmove.emplace_back(R + P, S + Q);
        }
        else if (R == K) {
            uvmove.emplace_back(R + P, S + Q);
        }
        else {
            uvmove.emplace_back(K + P, min(K, S) + Q);
            uvmove.emplace_back(R - K + P, min(K, S) + K + Q);
            uvmove.emplace_back(R + P, S + Q);
        }
    }

    write(uvmove.size() - 1);
    rep(i, 1, uvmove.size()) {
        int u = uvmove[i].first, v = uvmove[i].second;
        if (UVswap) swap(u, v);
        if (Urev) u *= -1;
        if (Vrev) v *= -1;
        int x = (u + v) / 2, y = (u - v) / 2;
        cout << x << ' ' << y << endl;
    }
}

Measured memory_bytes: 5868