#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <utility>
#include <queue>
#include <set>
#include <map>
#include <deque>
#include <iomanip>
#include <cstdio>
#include <stack>
#include <numeric>
#include <cassert>
using namespace std;
typedef  long long ll;
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
#define  MP make_pair
#define  PB push_back
#define inf 1000000007
#define mod 1000000007
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define int long long
ll k;

pair<ll,ll> calc(ll x,ll y,ll tar){
    ll p = x+y;
    ll a =  (k+tar-p)/2;
    ll b =  (tar-p-k)/2;
    if(x+a>=0&&y+b>=0){
        return MP(x+a,y+b);
    }else{
        return MP(x+b,y+a);
    }
}
signed main(){
    
    cin >> k;
    ll x,y;
    cin >> x >> y;
    bool fx=0,fy=0;
    if(x<0){
        fx = 1;
        x =-x;
    }
    if(y<0){
        fy = 1;
        y =-y;
    }
    vector<pair<ll,ll> > res;
    res.push_back(MP(x,y));
    ll p = x+y;
    if(k%2==0&&p%2==1){
        cout << "-1" << endl;
        return 0;
    }
    if(p%k!=0){
        int tar;
        if(k%2==0){
            if(p<k){
                auto a = calc(x,y,k);
                res.push_back(a);
                x = a.first;
                y = a.second;
            }else{
                tar = (p/k)*k;
                auto a = calc(x,y,tar);
                res.push_back(a);
                x = a.first;
                y = a.second;
            }
        }else{
            if(p%2==0){
                if(p<k){
                    auto a = calc(x,y,k);
                    res.push_back(a);
                    x = a.first;
                    y = a.second;
                }else{
                    tar = (p/k)*k;
                    if(tar%2==p%2){
                        tar+=k;
                    }
                    auto a = calc(x,y,tar);
                    res.push_back(a);
                    x = a.first;
                    y = a.second;
                }
            }else{
                if(p>k){
                    tar = (p/k)*k;
                    if(tar%2==p%2){
                        tar+=k;
                    }
                    auto a = calc(x,y,tar);
                    res.push_back(a);
                    x = a.first;
                    y = a.second;
                }else{
                    
                    tar = k+p;
                    auto a = calc(x,y,tar);
                    res.push_back(a);
                    x = a.first;
                    y = a.second;
                    a = calc(x,y,k);
                    res.push_back(a);
                    x = a.first;
                    y = a.second;
                }

            }
        }
    }
    while(x+y!=0){
        ll tar = x+y-k;
        if(tar==0)break;
        auto a = calc(x,y,tar);
        res.push_back(a);
        x = a.first;
        y = a.second;
    }
    reverse(res.begin(),res.end());
    // for(int i=0;i<res.size()-1;i++){
    //     if(abs(res[i].first-res[i+1].first)+abs(res[i].second-res[i+1].second)!=k){
    //         assert(0);
    //     }
    // }
    cout << res.size() << endl;
    for(auto x:res){
        if(fx)x.first = -x.first;
        if(fy)x.second = -x.second;
        cout << x.first << " " << x.second << endl;
    }
    return 0;
}

Measured memory_bytes: 6000