#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vs = vector<string>;
using pll = pair<ll, ll>;
using vp = vector<pll>;
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define repr(i, a, b) for(ll i = (a); i < (b); i++)
#define ALL(a) (a).begin(), (a).end()
#define SZ(x) ((ll)(x).size())
const ll MOD = 1000000007;
const ll INF = 100000000000000000LL;
inline ll GCD(ll a, ll b){ return b?GCD(b, a % b):a; }
inline ll LCM(ll a, ll b){ return a/GCD(a, b)*b; }
inline ll powint(ll x, ll y){ ll r=1; while(y){ if(y&1) r*=x; x*=x; y>>=1; } return r; }
inline ll powmod(ll x, ll y, ll m = MOD){ ll r=1; while(y){ if(y&1) r*=x; x*=x; r%=m; x%=m; y>>=1; } return r; }
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(b<a) { a=b; return 1; } return 0; }
#ifdef OJ_LOCAL
#include "dump.hpp"
#else
#define dump(...) ((void)0)
#endif

// 解説AC
int main(){
    cin.tie(0); ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    ll k;
    cin >> k;
    ll rx, ry;
    ll x, y;
    cin >> rx >> ry;
    x = abs(rx);
    y = abs(ry);
    bool sw = (x < y);
    if(sw) swap(x, y);
    
    ll d = x + y;
    if(d & 1 && !(k & 1)){
        cout << -1 << endl;
        return 0;
    }
    
    
    vp ansv;
    ll dx = 0, dy = 0;
    ll t = 0;
    ll mode = 0;
    if(d < k && d & 1){
        while(1){
            t += k;
            switch(mode){
            case 0:
                dy -= k;
                if(t >= k-x){
                    mode++;
                    dy = -(k-x);
                    dx = t-(k-x);
                    if(t >= (3*k+x-y)/2){
                        mode++;
                        dy += dx-(k+3*x-y)/2; 
                        dx = (k+3*x-y)/2;
                        if(t >= (5*k-x+y)/2){
                            mode++;
                            dx -= dy-y;
                            dy = y;
                        }
                    }
                }
                break;
            case 1:
                dx += k;
                if(t >= (3*k+x-y)/2){
                    mode++;
                    dy += dx-(k+3*x-y)/2; 
                    dx = (k+3*x-y)/2;
                    if(t >= (5*k-x+y)/2){
                        mode++;
                        dx -= dy-y;
                        dy = y;
                    }
                }
                break;
            case 2:
                dy += k;
                if(t >= (5*k-x+y)/2){
                    mode++;
                    dx -= dy-y;
                    dy = y;
                }
                break;
            case 3:
                dx -= k;
                break;
            default:
                assert(false);
                break;
            }
            ansv.emplace_back(dx, dy);
            if(dx == x && dy == y) break;
        }
    }else{
        ll c = (k - (d % k)) % k;
        ll n;
        if(d < k && d % 2 == 0) n = 2;
        if(d >= k && c % 2 == 0) n = (d+k-1)/k;
        if(d >= k && c % 2 != 0) n = (d+k-1)/k + 1;
        while(1){
            t += k;
            switch(mode){
            case 0:
                dy -= k;
                if(t >= (k*n-x-y)/2){
                    mode++;
                    dy = -(k*n-x-y)/2;
                    dx = t-(k*n-x-y)/2;
                    if(t >= (k*n+x-y)/2){
                        mode++;
                        dy += dx-x; 
                        dx = x;
                    }
                }
                break;
            case 1:
                dx += k;
                if(t >= (k*n+x-y)/2){
                    mode++;
                    dy += dx-x; 
                    dx = x;
                }
                break;
            case 2:
                dy += k;
                break;
            default:
                assert(false);
                break;
            }
            ansv.emplace_back(dx, dy);
            if(dx == x && dy == y) break;
        }
    }
    
    cout << SZ(ansv) << endl;
    rep(i, SZ(ansv)){
        if(sw) swap(ansv[i].first, ansv[i].second);
        if(rx < 0) ansv[i].first *= -1;
        if(ry < 0) ansv[i].second *= -1;
        cout << ansv[i].first << " " << ansv[i].second << endl;
    }
    return 0;
}

Measured memory_bytes: 5484