#include <bits/stdc++.h>
 
using namespace std;
 
#define DEBUG(x) cerr<<#x<<": "<<x<<endl;
#define DEBUG_VEC(v) cerr<<#v<<":";for(int i=0;i<v.size();i++) cerr<<" "<<v[i]; cerr<<endl;
#define DEBUG_MAT(v) cerr<<#v<<endl;for(int i=0;i<v.size();i++){for(int j=0;j<v[i].size();j++) {cerr<<v[i][j]<<" ";}cerr<<endl;}
typedef long long ll;
#define int ll
 
#define vi vector<int>
#define vl vector<ll>
#define vii vector< vector<int> >
#define vll vector< vector<ll> >
#define vs vector<string>
#define pii pair<int,int>
#define pis pair<int,string>
#define psi pair<string,int>
#define pll pair<ll,ll>
template<class S, class T> pair<S, T> operator+(const pair<S, T> &s, const pair<S, T> &t) { return pair<S, T>(s.first + t.first, s.second + t.second); }
template<class S, class T> pair<S, T> operator-(const pair<S, T> &s, const pair<S, T> &t) { return pair<S, T>(s.first - t.first, s.second - t.second); }
template<class S, class T> ostream& operator<<(ostream& os, pair<S, T> p) { os << "(" << p.first << ", " << p.second << ")"; return os; }
#define X first
#define Y second
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define rrep1(i,n) for(int i=(int)(n);i>0;i--)
#define REP(i,a,b) for(int i=a;i<b;i++)
#define in(x, a, b) (a <= x && x < b)
#define all(c) c.begin(),c.end()
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a = b; return 1; } return 0; }
#define UNIQUE(v) v.erase(std::unique(v.begin(), v.end()), v.end());
const ll inf = 1000000001;
const ll INF = (ll)1e18 + 1;
const long double pi = 3.1415926535897932384626433832795028841971L;
#define Sp(p) cout<<setprecision(25)<< fixed<<p<<endl;
//int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
//int dx2[8] = { 1,1,0,-1,-1,-1,0,1 }, dy2[8] = { 0,1,1,1,0,-1,-1,-1 };
vi dx = {1, 0, -1, 0}, dy = {0, 1, 0, -1};
vi dx2 = { 1,1,0,-1,-1,-1,0,1 }, dy2 = { 0,1,1,1,0,-1,-1,-1 };
#define fio() cin.tie(0); ios::sync_with_stdio(false);
const ll MOD = 1000000007;
//const ll MOD = 998244353;
// #define mp make_pair
//#define endl '\n'

clock_t start_time = clock();

vector<pll> add(vector<pll> a, ll sx, ll sy) {
    rep (i, a.size()) {
        a[i] = a[i] + pll(sx, sy);
    }
    return a;
}

vector<pll> ans;

void change(ll& x, ll& y, bool x_rev, bool y_rev, bool xy_swap) {
    if (xy_swap) swap(x, y);
    if (x_rev) x = -x;
    if (y_rev) y = -y;
}

void solve(ll sx, ll sy, ll gx, ll gy, ll k, bool x_rev=false, bool y_rev=false, bool xy_swap=false) {
    if ((gx + gy) % 2 != 0) {
        exit(1);
    }
    ll diff_x = abs(gx), diff_y = abs(gy);
    if (max(diff_x, diff_y) == k) {
        change(gx, gy, x_rev, y_rev, xy_swap);
        ans.push_back(pll(gx + sx, gy + sy));
        return;
    }

    if (gx < 0) {
        if (xy_swap) y_rev = !y_rev;
        else x_rev = !x_rev;
        gx = -gx;
    }
    if (gy < 0) {
        if (xy_swap) x_rev = !x_rev;
        else y_rev = !y_rev;
        gy = -gy;
    }
    if (gy < gx) {
        xy_swap = !xy_swap;
        swap(gx, gy);
    }

    if (max(diff_x, diff_y) < k) {
        bool flag = false;
        if (k % 2 == 1) {
            ll ori_x = (gx + gy) / 2;
            ll ori_y = (-gx + gy) / 2;
            if ((ori_x + ori_y) % 2 != 0) {
                flag = true;
                ll add_x = k, add_y = k;
                change(add_x, add_y, x_rev, y_rev, xy_swap);
                ans.push_back(pll(add_x + sx, add_y + sy));
                solve(add_x + sx, add_y + sy, gx - k, gy - k, k, x_rev, y_rev, xy_swap);
            }
        }
        if (not flag) {
            ll add_x = k, add_y = gy - k;
            change(add_x, add_y, x_rev, y_rev, xy_swap);
            ans.push_back(pll(add_x + sx, add_y + sy));
            solve(add_x + sx, add_y + sy, gx - k, k, k, x_rev, y_rev, xy_swap);
        }
    }
    else {
        ll nx, ny;
        if (gy % k == 0) {
            ny = k;
            nx = k;
        }
        else {
            ny = gy % k;
            nx = k;
            if ((nx + ny) % 2 != 0) {
                ny = k;
            }
        }
        ll add_x = nx, add_y = ny;
        change(add_x, add_y, x_rev, y_rev, xy_swap);
        ans.push_back(pll(add_x + sx, add_y + sy));
        solve(add_x + sx, add_y + sy, gx - nx, gy - ny, k, x_rev, y_rev, xy_swap);
    }

    return;
}

signed main() {
    ll k, x, y;
    cin >> k >> x >> y;
    if (k % 2 == 0 and (x + y) % 2 != 0) {
        cout << -1 << endl;
        return 0;
    }
    solve(0, 0, x - y, x + y, k);

    rep (i, ans.size()) {
        ll x = (ans[i].first + ans[i].second) / 2;
        ll y = (-ans[i].first + ans[i].second) / 2;
        ans[i] = pll(x, y);
    }

    cout << ans.size() << endl;
    rep (i, ans.size()) {
        cout << ans[i].first << " " << ans[i].second << endl;
    }
}

Measured memory_bytes: 30956