#include <iostream>
#include <map>
#include <set>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <fstream>
#include <bitset>
#include <queue>
#include <stack>
#include <deque>
#include <time.h>
#include <complex>

#define int long long

using std::cin;
using std::cout;
using std::cerr;
using std::endl;

using std::map;
using std::set;
using std::bitset;
using std::vector;
using std::string;
using std::multimap;
using std::multiset;
using std::deque;
using std::queue;
using std::stack;
using std::pair;
using std::iterator;
using std::complex;

using std::sort;
using std::stable_sort;
using std::reverse;
using std::max_element;
using std::min_element;
using std::unique;
using std::ios_base;
using std::swap;
using std::fill;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef string S;
typedef complex<double> cd;

ll min(ll a, ll b)
{
    if (a < b)
        return a;
    return b;
}

ll max(ll a, ll b)
{
    if (a > b)
        return a;
    return b;
}

namespace MySpace{
    struct Small_Segment_Tree{
        vector<int> a;
        int l, r;

        private:
        int __summ(int L, int R, int l, int r, int v)
        {
            if (L <= l && r <= R)
                return a[v];
            if (R <= l || r <= L)
                return 0;
            int m = (l + r) / 2;
            return __summ(L, R, l, m, 2 * v + 1) + __summ(L, R, m, r, 2 * v + 2);
        }

        void __set(int P, int l, int r, int v, int V)
        {
            if (l + 1 == r)
            {
                a[v] = V;
                return;
            }
            int m = (l + r) / 2;
            if (P < m)
            {
                __set(P, l, m, 2 * v + 1, V);
                a[v] = a[2 * v + 1] + a[2 * v + 2];
            }
            else
            {
                __set(P, m, r, 2 * v + 2, V);
                a[v] = a[2 * v + 1] + a[2 * v + 2];
            }
        }

        public:
        int Summ(int L, int R)
        {
            if (R < L)
                return 0;
            return __summ(L, R + 1, l, r, 0);
        }

        void Set(int P, int V)
        {
            __set(P, l, r, 0, V);
        }

        Small_Segment_Tree(int _n)
        {
            a.resize(4 * _n);
            l = 0, r = _n;
        }
    };
    long long inq(long long x, long long q, long long MOD)
    {
        if (q == 0)
            return 1;
        long long l = inq(x, q / 2, MOD);
        if (q % 2)
            return l * l % MOD * x % MOD;
        return l * l % MOD;
    }
};


using namespace MySpace;

#define F(i, n) for (int (i) = 0; (i) != (n); (i)++)
#define fi first
#define se second
#define re return
#define all(x) (x).begin(), (x).end()
#define int long long

void YN(int val)
{
    if (val >= 1)
    {
        printf("YES\n");
    }
    else
    {
        printf("NO\n");
    }
}
#define y0 y1234
//const ll MOD = 998244353;
const ll MOD = 1e12 + 7;

int x, y, k;
vector<pii> ans;

int calc(int x1, int y1, int x2, int y2)
{
    return abs(x1 - x2) + abs(y1 - y2);
}

bool can1(int val)
{
    if (abs(x) + abs(y) == k)
    {
        if (val)
           ans.push_back({x, y});
        return 1;
    }
    return 0;
}

bool can2(int val)
{
    int posx = abs(x);
    int posy = abs(y);
    int alpha = 2 * k - x - y;
    if (x + y > 2 * k) return 0;
    if (alpha % 2 == 1) return 0;
    alpha /= 2;
    int midx = posx, midy = posy, k0 = k;
    int len1 = alpha + posy;
    int len2 = posx;
    int len3 = alpha;
    if (k0 <= len1)
    {
        midy -= k0;
    }
    else
    {
        k0 -= len1;
        midy -= len1;
        if (k0 <= len2)
        {
            midx -= k0;
        }
        else
        {
            k0 -= len2;
            midx -= len2;
            midy += k0;
        }
    }
    if (abs(x) != x)
    {
        midx *= -1;
    }
    if (abs(y) != y)
    {
        midy *= -1;
    }
    if (calc(0, 0, midx, midy) != k || calc(x, y, midx, midy) != k)
        return 0;
    if (val == 1)
    {
        ans.push_back({x, y});
        ans.push_back({midx, midy});
    }
    return 1;
}

bool can3(int val)
{
    int posx = abs(x);
    int posy = abs(y);
    int alpha_betta = 3 * k - posx - posy;
    if (alpha_betta % 2 != 0)
        return 0;
    alpha_betta /= 2;

    int midx = posx, midy = posy, midx2 = 0, midy2 = 0;
    int betta = 0;
    if (k >= posx)
        betta = k - posx;
    else
        betta = 0;
    int alpha = alpha_betta - betta;
    int k1 = k, k2 = k;

    if (alpha + betta + posx < k)
        return 0;
    if (alpha + betta + posy < k)
        return 0;

    k1 -= betta;
    midx += betta;

    midy -= k1;

    k2 -= alpha;
    midy2 -= alpha;

    midx2 += k2;

    if (x != abs(x))
    {
        midx *= -1;
        midx2 *= -1;
    }
    if (y != abs(y))
    {
        midy *= -1;
        midy2 *= -1;
    }
    if (calc(x, y, midx, midy) != k || calc(midx, midy, midx2, midy2) != k || calc(midx2, midy2, 0, 0) != k)
        return 0;
    if (val == 1)
    {
        ans.push_back({x, y});
        ans.push_back({midx, midy});
        ans.push_back({midx2, midy2});
    }
    return 1;
}

signed main()
{
    ios_base::sync_with_stdio();
    cin.tie(0);
    cout.tie(0);
    cin >> k;
    cin >> x >> y;
    int vx = 1, vy = 1;
    if (x < 0)
    {
        x *= -1;
        vx *= -1;
    }
    if (y < 0)
    {
        y *= -1;
        vy *= -1;
    }

    if (k % 2 == 0 && (x + y) % 2 != 0)
    {
        cout << "-1";
        return 0;
    }

    while (1)
    {
        if (can1(0))
        {
            can1(1);
            break;
        }
        if (can2(0))
        {
            can2(1);
            break;
        }
        swap(x, y);
        if (can2(0))
        {
            can2(1);
            swap(ans[ans.size() - 1].fi, ans[ans.size() - 1].se);
            swap(ans[ans.size() - 2].fi, ans[ans.size() - 2].se);
            break;
        }
        swap(x, y);

        if (can3(0))
        {
            can3(1);
            break;
        }

        swap(x, y);
        if (can3(0))
        {
            can3(1);
            swap(ans[ans.size() - 1].fi, ans[ans.size() - 1].se);
            swap(ans[ans.size() - 2].fi, ans[ans.size() - 2].se);
            swap(ans[ans.size() - 3].fi, ans[ans.size() - 3].se);
            break;
        }
        swap(x, y);

        if (x >= k)
        {
            ans.push_back({x, y});
            x -= k;
        }
        if (x <= -k)
        {
            ans.push_back({x, y});
            x += k;
        }
        if (y >= k)
        {
            ans.push_back({x, y});
            y -= k;
        }
        if (y <= -k)
        {
            ans.push_back({x, y});
            y += k;
        }
    }

    reverse(all(ans));

    cout << ans.size() << "\n";
    for (int i = 0; i < ans.size(); i++)
    {
        cout << ans[i].fi * vx << " " << ans[i].se * vy << "\n";
    }
}


Measured memory_bytes: 5740