#include <bits/stdc++.h>

using namespace std;

/* g++ -g -fsanitize=address -lasan -std=c++11 -Dfoo_ */

/* freopen("input.txt", "rt", stdin); */
/* freopen("output.txt", "wt", stdout); */

#define ALL(c)          (c).begin(), (c).end()
#define ALLR(c)         (c).rbegin(), (c).rend()
#define FOR(i,a,b)      for (int i=(a); i < (b); ++i)
#define FORR(i,a,b)     for (int i=(a); i > (b); --i)
#define FOR_ALL(i,c)    for (__typeof((c).begin()) i=(c).begin();   \
                             i != (c).end(); ++i)
#define FOR_ALLR(i,c)   for (__typeof((c).rbegin()) i=(c).rbegin(); \
                             i != (c).rend(); ++i)
#define SZ(array)       (sizeof(array)/sizeof(array[0]))
#define lc(x)           (x<<1)     /* 2*x */
#define rc(x)           (x<<1 | 1) /* 2*x+1 */
#define lowbit(x)       (x & (-x)) /* 0b10100 -> 0b100 */

typedef long long       LL;
typedef map<int,int>    MII;
typedef pair<int,int>   PII;
typedef set<int>        SI;
typedef vector<bool>    VB;
typedef vector<double>  VD;
typedef vector<int>     VI;
typedef vector<string>  VS;

/* check if a key is in container C */
template <class C>
inline bool in_(const typename C::key_type& k, const C& A)
{ return A.find(k) != A.end(); }
inline bool in_(const string& s, const string& S)
{ return S.find(s) != string::npos; }

/*
 * Let's assume X >= 0 and Y >= 0, for simplicity. (If X and/or Y is
 * negative, we simply multiply the appropriate values in our output by
 * -1.)
 *
 * Let N be the minimum number of moves we need. Then, the total
 * Manhattan-distance across all of our moves is N*K. Additionally, in
 * the end, we must move X+Y further in positive directions. Therefore,
 * if A and B are the total distances we move in positive directions and
 * negative directions, we must have A+B=N*K and A-B=X+Y. Solving gives
 * A=(N*K+X+Y)/2 and B=(N*K-X-Y)/2. Since we can only move to integer
 * points, these must both be non-negative integers.
 *
 * If K is even and X+Y is odd, there is no solution. This is because
 * N*K+X+Y will be the sum of an even and an odd, so the result when it
 * is not divisible by 2.
 *
 * Otherwise, We must have that N*K >= X+Y and that N*K and X+Y have the
 * same parity. Because A,B are non-negative integers.
 *
 *        A         A = (N*K+X+Y)/2     2 linear functions w/ N as
 *    y  /|         B = (N*K-X-Y)/2     variable and slope = K/2
 *    | / |
 *    |/  |         The smallest integer n, where B >= 0 and A >= X+Y, 
 * +X+Y   B         is the minimum number of moves needed. Since the
 *    |  /|         functions are increasing, there is always a value
 *   -+-/-n-->x     can satisfy the condition.
 *    |/
 * -X-Y
 *    |
 */

const int inf = 1e9+7;

int main()
{
#ifdef foo_
    freopen("foo", "rt", stdin);
#endif
    int k,x,y;
    while (cin >> k >> x >> y) {
        const int X = abs(x);
        const int Y = abs(y);
        if (k%2 == 0 && (X+Y)%2)
            cout << -1 << endl;
        else {
            int n = 0, A = -1, B = -1;
            /* find smallest value of n */
            while (B < 0 || B%2 || A < 2*(X+Y) || A < 2*k) {
                n++; A = n*k+X+Y; B = n*k-X-Y;
            }
            A /= 2; B /= 2;
            int xx = 0, yy = 0; vector<PII> ans;
            while (B) {        /* negative moves (need to be 1st?!) */
                const int mv = min(B,k);
                if (mv < k) {
                    /*
                     * The extra has to move in the positive direction.
                     * It can't over shot, because we will not have any
                     * negative moves left.
                     */
                    const int extra = k-mv;
                    if (yy + extra <= Y)
                        xx -= mv, yy += extra;
                    else
                        yy -= mv, xx += extra;
                    A -= extra;
                }
                else
                    xx -= mv;
                B -= mv;
                ans.push_back(PII(xx,yy));
            }
            while (A) {         /* positive moves, 2nd */
                if (xx+k <= X)
                    xx += k;
                else if (yy+k <= Y)
                    yy += k;
                else            /* must be the last move */
                    xx = X, yy = Y;
                A -= k;
                ans.push_back(PII(xx,yy));
            }
            cout << ans.size() << endl;
            FOR_ALL(a,ans) {
                int xx = a->first, yy = a->second;
                if (x < 0) xx *= -1;
                if (y < 0) yy *= -1;
                cout << xx << ' ' << yy << endl;
            }
        }
    }
    return 0;
}


Measured memory_bytes: 3952