#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 nonnegative 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.
 *
 * We must have that N*K >= X+Y and that N*K and X+Y have the same
 * parity. Because A,B are nonnegative integers.
 *
 *        A         A = (N*K+X+Y)/2     form 2 linear functions
 *    y  /|         B = (N*K-X-Y)/2
 *    | / |
 *    |/  |         The smallest integer n where B >= 0 the smallest
 *  X+Y   B         number of step needed to jump. Since the functions
 *    |  /|         are increasing, there is always a value n can
 *   -+-/-n-->x     satisfy the condition.
 *    |/
 * -X-Y
 *    |
 */

const int inf = 1e9+7;

int main()
{
#ifdef foo_
    freopen("foo", "rt", stdin);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0);
    int k,x,y;
    while (cin >> k >> x >> y) {
        const LL X = abs(x);
        const LL Y = abs(y);
        if (k%2 == 0 && (X+Y)%2)
            cout << -1 << endl;
        else {
            int n = 0, A,B;
            while ((B = n*k-X-Y) < 0 || B%2 || (A = n*k+X+Y) < 2*k)
                n++;
            A /= 2; B /= 2;
            int xx = 0, yy = 0; vector<PII> ans;
            while (B) {     /* first take care of the negative move */
                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 */
                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