#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <bitset>
#include <array>
#include <vector>
#include <queue>
#include <set>
#include <cmath> // 変数名にy1が使えなくなるかも…。
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <limits>
#include <functional>
#include <string>

typedef __int128_t int128_t;
std::istream &operator>>(std::istream& input, int128_t& value) { // int128_tの入力。入力が64bitに収まる前提。
    long long tmp; input >> tmp; value = tmp;
    return input;
}
std::ostream &operator<<(std::ostream& output, const int128_t value) { // int128_tの出力。出力が64bitに収まる前提。
    output << (long long)value;
    return output;
}

#define rep(i, begin, end) for(int64_t i = (begin); i <= (end); i++)
#define rev(i, begin, end) for(int64_t i = (begin); (end) <= i; i--)

void printvec(const std::vector<int>& vec) {
    for (int i = 0; i < vec.size(); i++) { std::cout << vec[i] << " "; } std::cout << std::endl;
}

const int MAX_N = 1e5 + 10;
int128_t K;
int64_t X, Y;

std::pair<int64_t, int64_t> back(std::pair<int64_t, int64_t> p) {
    return std::pair<int64_t, int64_t>({(p.first + p.second)/2, (p.first - p.second)/2});
}

std::pair<int64_t, int64_t> back(std::pair<int64_t, int64_t> p, int sw, int sx, int sy) {
    if (sw == 1) {
        std::swap(p.first, p.second);
    }
    p.first = p.first * sx;
    p.second = p.second * sy;
    return p;
}

int128_t check(int128_t K, int128_t X, int128_t Y) {
    int128_t D = X+Y;
    int128_t A = std::max((int128_t)2, (D+K-1)/K);
    int128_t L = A * K;
    if((L-D)%2){
        A++;
        L += K;
    }
    return A;
}

int main(int argc, char **argv) {
    std::cin >> K;
    std::cin >> X >> Y;

    //rep (K, 1, 1000) {
    //    rep (X, 1, 100) {
    //        rep (Y, 1, X) {

    int sx = 1;
    int sy = 1;
    int sw = 0;
    if (X < 0) {
        X = -X;
        sx = -1;
    }
    if (Y < 0) {
        Y = -Y;
        sy = -1;
    }

    if (X < Y) {
        std::swap(X, Y);
        sw = 1;
    }

    std::vector<std::pair<int64_t, int64_t>> pair;
    pair.push_back({0, 0});

    int m = (X + Y) % K;

    if (m == 0) {
        while (pair.back().first + K <= X) {
            pair.push_back({pair.back().first + K, 0});
        }
        pair.push_back({X, K - (X - pair.back().first)});
        while (pair.back().second + K <= Y) {
            pair.push_back({X, pair.back().second + K});
        }
        //assert(false);
    } else if (K % 2 == 0 && m % 2 == 1) {
        std::cout << -1 << std::endl;
        return 0;
    } else {
        int128_t Z = K - m;
        if (Z % 2 == 1) {
            Z += K;
        } else if (K % 2 == 0 && Z / 2 + X < K) {
            Z += K;
        }
        assert(Z % 2 == 0);
        if (Z / 2 + X >= K) {
            pair.push_back({K - Z/2, -Z/2});
            while (pair.back().first + K <= X) {
                pair.push_back({pair.back().first + K, pair.back().second});
            }
            pair.push_back({X, pair.back().second + K - (X - pair.back().first)});
            while (pair.back().second + K <= Y) {
                pair.push_back({X, pair.back().second + K});
            }
            //assert(pair.size() - 1 == check());
        } else {
            assert((K + X - Y) % 2 == 0);
            assert((K - X + Y) % 2 == 0);
            pair.push_back({X, -(K - X)});
            pair.push_back({X + (K + X - Y) / 2, -(K - X) + (K - X + Y) / 2 });
            pair.push_back({X, Y});
            assert(check(K, X, Y) != 2);
        }
        assert(pair.size() - 1 == check(K, X, Y));
    }

            //}
        //}
    //}

    std::cout << pair.size() - 1 << std::endl;

    rep (i, 1, pair.size() - 1) {
        auto p = back(pair[i], sw, sx, sy);
        std::cout << p.first << " " << p.second << std::endl;
    }
    
    return 0;
}

Measured memory_bytes: 5484