#include <bits/stdc++.h>

using namespace std;
using ll = long long;

struct Point {
    ll x, y;

    Point operator+(const Point& p) const { return Point { x + p.x, y + p.y }; }
    Point operator*(ll k) const { return Point { k*x, k*y }; }
    bool operator==(const Point& p) const { return x == p.x and y == p.y; }
    bool operator!=(const Point& p) const { return x != p.x or y != p.y; }
};

vector<Point> follow_path(const vector<Point>& ps, ll K)
{
    vector<Point> ans;
    Point P { 0, 0 };
    ll steps = K;

    for (auto Q : ps)
    {
        ll dx { Q.x - P.x < 0 ? -1 : 1 }, dy { Q.y - P.y < 0 ? -1 : 1 };
        Point ux { dx, 0 }, uy { 0, dy };

#ifdef DEBUG
    cout << "-- Going to Q = (" << Q.x << ", " << Q.y << ") from P = (" << P.x << ", " << P.y << ")" << endl;
#endif
        while (P != Q)        
        {
            ll t = min(steps, llabs(P.x - Q.x));
            P = P + ux*t;
            steps -= t;

#ifdef DEBUG
    cout << "-- t = " << t << ", new P = (" << P.x << ", " << P.y << ")" << endl;
#endif
            t = min(steps, llabs(P.y - Q.y));
            P = P + uy*t;
            steps -= t;

#ifdef DEBUG
    cout << "-- t = " << t << ", new P = (" << P.x << ", " << P.y << ")" << ", steps = " << steps << endl;
#endif

            if (steps == 0)
            {
                ans.push_back({ P.x, P.y });
                steps = K;
            }
        }
    }

    return ans;
}

Point target(const Point& Q)
{
    auto P = Q;

    if (llabs(P.x) < llabs(P.y))
        swap(P.x, P.y);

    if (P.x >= 0 and P.y >= 0)
        P = { P.x, P.y };
    else if (P.x <= 0 and P.y >= 0)
        P = { -P.x, P.y };
    else if (P.x <= 0 and P.y <= 0)
        P = { -P.x, -P.y };
    else
        P = { P.x, -P.y };

    return P;
}

void adjust(vector<Point>& ans, const Point& P)
{
    if (llabs(P.x) < llabs(P.y))
        for (auto& Q : ans)
            swap(Q.x, Q.y);

    if (P.x >= 0 and P.y >= 0)
    {
    } else if (P.x <= 0 and P.y >= 0)
    {
        for (auto& Q : ans)
            Q = Point { -Q.x, Q.y };
    }
    else if (P.x <= 0 and P.y <= 0)
    {
        for (auto& Q : ans)
            Q = Point { -Q.x, -Q.y };
    }
    else
    {
        for (auto& Q : ans)
            Q = Point { Q.x, -Q.y };
    }
}

vector<Point> solve(int K, int X, int Y)
{
    // Quando K é par a paridade da soma X + Y se mantém
    if (K % 2 == 0 and (X + Y) % 2)
        return { };

    auto Q = target({ X, Y });

#ifdef DEBUG
    cout << "== Q = (" << Q.x << ", " << Q.y << ")" << endl;
#endif

    vector<Point> ans;

    if (Q.x + Q.y < K and (Q.x + Q.y) % 2)
    {
        vector<Point> path { 
            { 0, -(K - Q.x) },
            { Q.x + (K + Q.x - Q.y)/2, -(K - Q.x) },
            { Q.x + (K + Q.x - Q.y)/2, Q.y },
            { Q.x, Q.y },
        };

        ans = follow_path(path, K);
    } else 
    {
        ll n = 2;
    
        if (Q.x + Q.y >= K)
        {
            auto c = ((K - ((Q.x + Q.y) % K)) + K) % K;
            n = c % 2 ? (Q.x + Q.y + K - 1)/K + 1 : (Q.x + Q.y + K - 1)/K;
        }

        vector<Point> path { 
            { 0, -(K*n - Q.x - Q.y)/2 },
            { Q.x, -(K*n - Q.x - Q.y)/2 },
            { Q.x, Q.y },
        };

        ans = follow_path(path, K);
    }

    adjust(ans, Point { X, Y });

    return ans;
}

int main()
{
    ios::sync_with_stdio(false);

    int K, X, Y;
    cin >> K >> X >> Y;

    auto ans = solve(K, X, Y);

    if (ans.empty())
        cout << -1 << endl;
    else
    {
        cout << ans.size() << '\n';

        for (auto p : ans)
            cout << p.x << ' ' << p.y << '\n';
    }

    return 0;
}


Measured memory_bytes: 7488