#include <bits/stdc++.h>
using namespace std;
 
#define repr(i,a,b) for(int i=a, i##_len=(b); i<i##_len; ++i)
#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define irepr(i,a,b) for(int i=a, i##_len=(b); i>=i##_len; --i)
#define irep(i,n) for(int i=n, i>=0; --i)
 
#define printline(str) cout << str << "\n"
 
#define lint longlong
 
struct point{
  int x;
  int y;
};
 
struct Info{
  int xSign;
  int ySign;
  bool swapFlag;
};
 
point operator+(const point lhs, const point rhs){
  return {lhs.x+rhs.x, lhs.y+rhs.y};
}
point operator-(const point lhs, const point rhs){
  return {lhs.x-rhs.x, lhs.y-rhs.y};
}
 
 
int D(const point& p){
  return abs(p.x) + abs(p.y);
}
 
point Approach(const point& g, int K){
  int dx = (g.x-g.y)/2;
  int dy = K-(g.x-g.y)/2;
  return {dx,dy};
}
 
void printShot(const point& s, const Info& info){
  if( info.swapFlag){
    printline( info.xSign*s.y << " " << info.ySign*s.x);
  }else{
    printline( info.xSign*s.x << " " << info.ySign*s.y);
  }
};
 
void Approach(point& current, const point& goal, int K, const Info& info){
 
  if( D(goal)%2 == 0){
    if( goal.x >= goal.y){
      current = current + point{(goal.x-goal.y)/2, K-(goal.x-goal.y)/2};
    }else{
      current = current + point{K+(goal.x-goal.y)/2, (goal.y-goal.x)/2};
    }
    printShot(current, info);
  }else{
    if(goal.x <= K){
      current = current + point{K,0};
      printShot(current, info);
      current = current + point{(goal.x+goal.y-K)/2-K, (goal.x+goal.y-K)/2};
      printShot(current, info);
    }else{
      current = current + point{K,0};
      printShot(current, info);
      auto tmp = goal - point{K,0};
      if(  tmp.x >= tmp.y ){
        current = current + point{(tmp.x-tmp.y)/2, K-(tmp.x-tmp.y)/2};
      }else{
        current = current + point{K+(goal.x-goal.y+K)/2, K-(goal.x-goal.y+K)/2} - point{K,0};
      }
      printShot(current, info);
    }
  }
}
 
 
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
 
  int K,X,Y;
  cin >> K;
  cin >> X >> Y;
  int d = abs(X) + abs(Y);
  int xSign = X == 0 ? 1 : X/max(abs(X), 1);
  int ySign = Y == 0 ? 1 : Y/max(abs(Y), 1);
  bool swapFlag = false;
  X = abs(X);
  Y = abs(Y);
  if( Y > X){
    swap(X,Y);
    swapFlag = true;
  }
  point G = {X,Y};
  Info info = {xSign, ySign, swapFlag};
{
  if( K==d){
    printline(1);
  }else if(d%K == 0){
    printline(d/K);
  }else if( K%2==0){
    if( d%2!=0){
      printline(-1);
      return 0;
    }
    printline( max((int)(d/K)+1, 2) );
  }else{
    if( d%2!=0){
      if( ((int)(d/K)+1)%2 == 0){
        printline( max((int)(d/K)+2, 3) );
      }else{
        printline( max((int)(d/K)+1, 3) );
      }
    }else{
      if( ((int)(d/K)+1)%2 == 0){
        printline( max((int)(d/K)+1, 2) );
      }else{
        printline( max((int)(d/K)+2, 2) );
      }
    }
  }
}
  
  vector<pair<int,int>> p;
  if( d == K){
    printShot(G, info);
    return 0;
  }
  else if( d < K){
    if( d%2==0){
      printShot(Approach(G, K), info);
      printShot(G, info);
    }else{
      if(K%2==0){
        printline(-1);
        return 0;
      }
      printShot({K,0}, info);
      printShot({(X+Y+K)/2, (X+Y+K)/2}, info);
      printShot(G, info);
    }
  }
  else{
    int nY = Y/K;
    int nX = X/K;
    point current = {0,0};
    rep(i,nY){
      current = current + point{0,K};
      printShot(current, info);
    }
 
 
    if( d%K==0){
      rep(i,nX){
        current = current + point{K,0};
        printShot(current, info);
      }
      if( current.x == G.x && current.y == G.y){
        return 0;
      }
      printShot(G, info);
      return 0;
    }
 
 
    rep(i,nX-1){
      current = current + point{K,0};
      printShot(current, info);
    }
 
    point goal = G - current;
    int distance = goal.x+goal.y;
    if( distance > 2*K){
      current = current + point{K,0};
      printShot(current, info);
      goal = G - current;
      distance = goal.x+goal.y;
    }
 
    Approach(current, goal, K, info);
    printShot(G, info);
 
 
  }
 
}

Measured memory_bytes: 2304