#include<bits/stdc++.h>
using namespace std;
#define FOR(i,l,r) for(long long i=(l);i<(r);++i)
#define REP(i,n) FOR(i,0,n)
#define REPS(i,n) FOR(i,1,n+1)
#define RFOR(i,l,r) for(long long i=(l);i>=(r);--i)
#define RREP(i,n) RFOR(i,n-1,0)
#define RREPS(i,n) RFOR(i,n,1)
#define int long long
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define SZ(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b; return true; }return false; }
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b; return true; }return false; }
const int INF = 1e18;

int Roundup_div(int x, int y){
    int ret = (x+y-1) / y;
    return ret;
}

signed main(){
    int k, x, y; cin >> k >> x >> y;
    bool xrev = false, yrev = false, xyturn = false;
    if(x < 0){
        xrev = true;
        x *= -1;
    }
    if(y < 0){
        yrev = true;
        y *= -1;
    }
    if(y > x){
        xyturn = true;
        swap(x,y);
    }
    if((x+y) % 2 and !(k % 2)){
        cout << -1 << endl;
        return 0;
    }
    int path_len = Roundup_div(x+y,k) * k;
    if(path_len == k and x + y != k) path_len += k;
    if((path_len - x - y) % 2)  path_len += k;
    cout << path_len / k << '\n' ;
    if(path_len / k == 3 and Roundup_div(x+y,k) == 1){
        int m = (path_len - x - y) /2;
        int MIN_X = m/2;
        int MAX_Y = m-MIN_X + y;
        MIN_X *= -1;
        int nx = 0, ny= 0;
        vector<pair<int,int>> ans;
        REPS(i,path_len/k){
            int power = k;
            if(!ny){
                nx -= power;
                power = 0;
            } 
            if(nx == MIN_X and ny < MAX_Y){
                ny += power;
                power = 0;
            }
            if(ny == MAX_Y and nx < x) {
                nx += power;
                power = 0;
            }
            if(nx == x) ny -= power;
            if(nx < MIN_X){
                ny += MIN_X - nx;
                nx = MIN_X;
			}
            if(ny > MAX_Y){
                nx += ny - MAX_Y;
                ny = MAX_Y;
            }
            if(nx > x){
                ny -= nx - x;
                nx = x;
            }
            ans.pb({nx,ny});
        }
        for(auto p: ans){
            if(xyturn){
                cout << p.second * (xrev ? -1 : 1) << " " << p.first * (yrev ? -1 : 1) << '\n';
            }
            else{
                cout << p.first * (xrev ? -1 : 1) << " " << p.second * (yrev ? -1 : 1) << '\n';
            }
        }
        return 0;
    }
    int nx = 0, ny= 0;
    int MAX_Y = (path_len - x - y) / 2 + y;
    vector<pair<int,int>> ans;
    REPS(i,path_len/k){
        int power = k;
        if(!nx){
            ny += power;
            power = 0;
        }
        if(ny == MAX_Y and nx <x){
            nx += power;
            power = 0;
        }
        if(nx == x and i != path_len/k) ny -= power;
        if(ny > MAX_Y){
            nx += ny- MAX_Y;
            ny = MAX_Y;
        }
        if(nx > x){
            ny -= nx-x;
            nx = x;
        }
        ans.pb({nx,ny});
    }
	for(auto p: ans){
        if(xyturn){
            cout << p.second * (xrev ? -1 : 1) << " " << p.first * (yrev ? -1 : 1) << '\n';
        }
        else{
            cout << p.first * (xrev ? -1 : 1) << " " << p.second * (yrev ? -1 : 1) << '\n';
        }
    }
}

Measured memory_bytes: 7412