#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pi;
typedef pair<pi, pi> pp;
typedef pair<ll, ll> pl;
const double EPS = 1e-9;
const ll MOD = 1000000007;
const int inf = 1 << 30;
const ll linf = 1LL << 60;

ll k, x, y;
bool mx = false, my = false, sxy = false;
vector<pl> ans;

int main() {
    cin >> k >> x >> y;
    if (x < 0) {
        mx = true;
        x *= -1;
    }
    if (y < 0) {
        my = true;
        y *= -1;
    }
    if (y > x) {
        sxy = true;
        swap(x,y);
    }
    if ((x+y)%k == 0) {
        ll nx = 0, ny = 0;
        while (nx < x) {
            if (nx+k <= x) {
                nx += k;
            }  else {
                ny += k-(x-nx);
                nx = x;
            }
            ans.push_back(pl(nx,ny));
        }
        while (ny < y) {
            ny += k;
            ans.push_back(pl(nx,ny));
        }
    } else if (k%2 == 0) {
        if ((x+y)%2) {
            puts("-1");
            return 0;
        }
        ll nx = 0, ny = 0;
        if (x+y < k) {
            while (ny+k <= y) {
                ny += k;
                ans.push_back(pl(nx,ny));
            }
            while (nx+k <= x) {
                nx += k;
                ans.push_back(pl(nx,ny));
            }
            ll d = (2*k-x-y)/2;
            nx = k-d;
            ny = -d;
            ans.push_back(pl(nx,ny));
            ll tx = (k+x-nx)%k;
            nx += tx;
            ny += (k-tx);
            ans.push_back(pl(nx,ny));
        } else {
            ll d = (k-(x+y)%k)/2;
            nx = k-d;
            ny = -d;
            ans.push_back(pl(nx,ny));
            ll tx = (k+x-nx)%k;
            nx += tx;
            ny += (k-tx);
            ans.push_back(pl(nx,ny));
            while (ny < y) {
                ny += k;
                ans.push_back(pl(nx,ny));
            }
            while (nx > x) {
                nx -= k;
                ans.push_back(pl(nx,ny));
            }
            while (nx < x) {
                nx += k;
                ans.push_back(pl(nx,ny));
            }
        }
    } else {
        ll r = (x+y)%k;
        ll nx = 0, ny = 0;
        ll d = (k-r)%2?(2*k-r)/2:(k-r)/2;
        while (ny > -d) {
            if (ny-k < -d) {
                nx = k-(d+ny);
                ny = -d;
                ans.push_back(pl(nx,ny));
            } else {
                ny -= k;
                ans.push_back(pl(nx,ny));
            }
        }
        ll tx = (k+x-nx)%k;
        nx += tx;
        ny += (k-tx);
        ans.push_back(pl(nx,ny));
        while (ny < y) {
            ny += k;
            ans.push_back(pl(nx,ny));
        }
        while (nx > x) {
            nx -= k;
            ans.push_back(pl(nx,ny));
        }
        while (nx < x) {
            nx += k;
            ans.push_back(pl(nx,ny));
        }
    }
    cout << ans.size() << endl;
    rep(i,ans.size()) {
        if (!sxy) {
            cout << (mx?-1:1)*ans[i].first << " " << (my?-1:1)*ans[i].second << endl;
        } else {
            cout << (mx?-1:1)*ans[i].second << " " << (my?-1:1)*ans[i].first << endl;
        }
    }
}


Measured memory_bytes: 6000