#include<iostream>
#include<vector>
#include<algorithm>
#include<functional>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<unordered_map>
#include<climits>
#include<cstdlib>
#include<cmath>
#include<string>
#include<iomanip>
#include<bitset>
#include<list>

using namespace std;

#define ll long long int

ll const MOD = 1000000007;
ll const INF = (long long int)1 << 61;

ll mypow(ll x,ll n,ll mod = MOD){
    ll ret = 1;
    while(n > 0){
        if(n&1){
            ret = (ret*x)%mod;
        }
        x = (x*x)%mod;
        n >>= 1;
    }
    return ret;
}

ll mygcd(ll a,ll b){
    if(b == 0)return a;
    return mygcd(b,a%b);
}

ll twoPow(ll shiftNum){
    return (1LL << (shiftNum - 1));
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
 
    ll k;
    cin >> k;
    ll x,y;
    cin >> x >> y;

    vector<ll> xans,yans;
    vector<ll> xdans,ydans;

    ll xsign = (x == 0 ? 1 : x/abs(x));
    ll ysign = (y == 0 ? 1 : y/abs(y));

    x = abs(x);
    y = abs(y);

    ll xpos = 0;
    ll ypos = 0;

    ll rest = (x + y)%k;
    if(rest != 0){
        if(k % 2 == 0 && rest % 2 != 0){
            cout << -1 << endl;
            return 0;
        }else if(k % 2 == 0 && rest % 2 == 0){
            ll mov = rest + k;
            if(mov > (x + y)){
                mov = rest;
            }
            ll onemov = mov/2;
            if(mov <= x){
                xpos += onemov;
                ypos += k - onemov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
                xpos += onemov;
                ypos -= k - onemov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
            }else if(onemov <= x){
                xpos += onemov;
                ypos -= k - onemov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
                xpos = x;
                ypos = -x + mov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
            }else{
                ypos += onemov;
                xpos -= k - onemov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
                xpos = x;
                ypos = -x + mov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
            }
        }else if(k % 2 != 0 && rest % 2 != 0){
            ll mov = rest + k;
            ll onemov = mov/2;
            if(mov <= x){
                xpos += onemov;
                ypos += k - onemov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
                xpos += onemov;
                ypos -= k - onemov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
            }else if(onemov <= x){
                xpos += onemov;
                ypos -= k - onemov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
                xpos = x;
                ypos = -x + mov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
            }else{
                ypos += onemov;
                xpos -= k - onemov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
                xpos = x;
                ypos = -x + mov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
            }
        }else{
            ll mov = rest;
            ll onemov = mov/2;
            if(mov <= x){
                xpos += onemov;
                ypos += k - onemov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
                xpos += onemov;
                ypos -= k - onemov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
            }else if(onemov <= x){
                xpos += onemov;
                ypos -= k - onemov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
                xpos = x;
                ypos = -x + mov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
            }else{
                ypos += onemov;
                xpos -= k - onemov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
                xpos = x;
                ypos = -x + mov;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
            }
        }
    }

    while(true){
        if(x == xpos && y == ypos){
            break;
        }
        ll r = k;
        if(x > xpos){
            if(xpos + r <= x){
                xpos += r;
                r = 0;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
            }else{
                r -= x - xpos;
                xpos = x;
                ypos += r;
                xans.push_back(xsign * xpos);
                yans.push_back(ysign * ypos);
            }
        }else{
            ypos += (y > ypos ? r : -r);
            xans.push_back(xsign * xpos);
            yans.push_back(ysign * ypos);
        }
    }

    cout << xans.size() << endl;

    for(int i = 0; i < xans.size(); i++){
        cout << xans[i] << " ";
        cout << yans[i] << endl;
    }

    return 0;
}

Measured memory_bytes: 5604