#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(x) (x).begin(),(x).end()
const int mod=1000000007,MAX=5003;
const ll INF=1LL<<60;

int main(){
    
    int K;cin>>K;
    int h,w;cin>>h>>w;
    int X=abs(h),Y=abs(w);
    int xparity=1,yparity=1;
    if(h!=0) xparity=h/X;
    if(w!=0) yparity=w/Y;
    int xnow=0,ynow=0;
    
    if(K%2==0&&(X+Y)%2!=0){
        cout<<-1<<endl;
        return 0;
    }
    
    if(K%2==0){
        int N;
        
        if((X+Y)%K==0){
            
            N=(X+Y)/K;
            cout<<N<<endl;
            vector<int> xans(N),yans(N);
            
            for(int i=0;i<N;i++){
                int xplus=min(K,X-xnow);
                xans[i]=xnow+xplus;
                xnow=xans[i];
                yans[i]=ynow+K-xplus;
                ynow=yans[i];
            }
            
            for(int i=0;i<N;i++){
                cout<<xans[i]*xparity<<" "<<yans[i]*yparity<<endl;
            }
            
            return 0;
        }else if(X+Y<K){
            N=2;
            cout<<N<<endl;
            vector<int> xans(N),yans(N);
            
            int rem=(2*K-X-Y)/2;
            
            if(X<=Y){
                xans[0]=X+rem;
                yans[0]=K-(X+rem);
            }else{
                yans[0]=Y+rem;
                xans[0]=K-(Y+rem);
            }
            
            xans[1]=X;yans[1]=Y;
            
            for(int i=0;i<N;i++){
                cout<<xans[i]*xparity<<" "<<yans[i]*yparity<<endl;
            }
            
            return 0;
        }else{
            N=(X+Y+K-1)/K;
            cout<<N<<endl;
            vector<int> xans(N),yans(N);
            
            for(int i=0;i<N-2;i++){
                int xplus=min(K,X-xnow);
                xans[i]=xnow+xplus;
                xnow=xans[i];
                yans[i]=ynow+K-xplus;
                ynow=yans[i];
            }
            
            int rem=(2*K-(X-xnow)-(Y-ynow))/2;
            
            if((X-xnow)<=(Y-ynow)){
                xans[N-2]=X+rem;
                yans[N-2]=ynow+K-(X-xnow+rem);
            }else{
                yans[N-2]=Y+rem;
                xans[N-2]=xnow+K-(Y-ynow+rem);
            }
            
            xans[N-1]=X;yans[N-1]=Y;
            
            for(int i=0;i<N;i++){
                cout<<xans[i]*xparity<<" "<<yans[i]*yparity<<endl;
            }
            
            return 0;
            
        }
    }else{
        int N;
        
        if((X+Y)%K==0){
            N=(X+Y)/K;
            cout<<N<<endl;
            vector<int> xans(N),yans(N);
            
            for(int i=0;i<N;i++){
                int xplus=min(K,X-xnow);
                xans[i]=xnow+xplus;
                xnow=xans[i];
                yans[i]=ynow+K-xplus;
                ynow=yans[i];
            }
            
            for(int i=0;i<N;i++){
                cout<<xans[i]*xparity<<" "<<yans[i]*yparity<<endl;
            }
            
            return 0;
        }else if(X+Y<K){
            if((X+Y)%2==0){
                N=2;
                cout<<N<<endl;
                vector<int> xans(N),yans(N);
                
                int rem=(2*K-X-Y)/2;
                
                if(X<=Y){
                    xans[0]=X+rem;
                    yans[0]=K-(X+rem);
                }else{
                    yans[0]=Y+rem;
                    xans[0]=K-(Y+rem);
                }
                
                xans[1]=X;yans[1]=Y;
                
                for(int i=0;i<N;i++){
                    cout<<xans[i]*xparity<<" "<<yans[i]*yparity<<endl;
                }
                
                return 0;
            }else{
                N=3;
                cout<<N<<endl;
                vector<int> xans(N),yans(N);
                
                if(X<=Y){
                    xans[0]=-(K-Y);yans[0]=Y;
                    xans[1]=-(K-Y)+(K-(K+Y-X)/2);yans[1]=Y+(K+Y-X)/2;
                    xans[2]=X;yans[2]=Y;
                }else{
                    xans[0]=X;yans[0]=-(K-X);
                    xans[1]=X+(K+X-Y)/2;yans[1]=-(K-X)+(K-(K+X-Y)/2);
                    xans[2]=X;yans[2]=Y;
                }
                
                for(int i=0;i<N;i++){
                    cout<<xans[i]*xparity<<" "<<yans[i]*yparity<<endl;
                }
                
                return 0;
            }
        }else{
            int mo=(X+Y)%K;
            if(mo%2==0){
                N=(X+Y+K-1)/K+1;
                cout<<N<<endl;
                vector<int> xans(N),yans(N);
                
                for(int i=0;i<N-2;i++){
                    int xplus=min(K,X-xnow);
                    xans[i]=xnow+xplus;
                    xnow=xans[i];
                    yans[i]=ynow+K-xplus;
                    ynow=yans[i];
                }
                
                int rem=(2*K-(X-xnow)-(Y-ynow))/2;
                
                if((X-xnow)<=(Y-ynow)){
                    xans[N-2]=X+rem;
                    yans[N-2]=ynow+K-(X-xnow+rem);
                }else{
                    yans[N-2]=Y+rem;
                    xans[N-2]=xnow+K-(Y-ynow+rem);
                }
                
                xans[N-1]=X;yans[N-1]=Y;
                
                for(int i=0;i<N;i++){
                    cout<<xans[i]*xparity<<" "<<yans[i]*yparity<<endl;
                }
                
                return 0;
            }else{
                N=(X+Y+K-1)/K;
                cout<<N<<endl;
                vector<int> xans(N),yans(N);
                
                for(int i=0;i<N-2;i++){
                    int xplus=min(K,X-xnow);
                    xans[i]=xnow+xplus;
                    xnow=xans[i];
                    yans[i]=ynow+K-xplus;
                    ynow=yans[i];
                }
                
                int rem=(2*K-(X-xnow)-(Y-ynow))/2;
                
                if((X-xnow)<=(Y-ynow)){
                    xans[N-2]=X+rem;
                    yans[N-2]=ynow+K-(X-xnow+rem);
                }else{
                    yans[N-2]=Y+rem;
                    xans[N-2]=xnow+K-(Y-ynow+rem);
                }
                
                xans[N-1]=X;yans[N-1]=Y;
                
                for(int i=0;i<N;i++){
                    cout<<xans[i]*xparity<<" "<<yans[i]*yparity<<endl;
                }
                
                return 0;
            }
        }
        
    }
    
    
    
}




Measured memory_bytes: 3840