#include <iostream>
#include <algorithm>
#include <vector>
#include <cassert>
#include <cstdio>
#define int long long
#define rep(i, n) for(i = 0; i < n; i++)
using namespace std;
typedef pair<int, int> P;

//45°回転, √2倍
void rot45(int &x, int &y) {
	int xx = x; int yy = y;
	x = xx - yy; y = xx + yy;
}

//-45°回転, 1/ √2倍
void inv45(int &x, int &y) {
	int xx = x; int yy = y;
	x = (xx + yy) / 2; y = (-xx + yy) / 2;
}

//(0, 0) -> (x, y)の最短手数. (x, y)は45°回転後. 移動不可なら∞を返す.
int eval(int x, int y, int k) {
	x = abs(x); y = abs(y);
	int d = max(x, y);
	
	if ((x + y) % 2 == 1) return 1145141919;
	
	if (k % 2 == 0) {
		if (d % 2 == 1) return 1145141919;
		if (d == 0) return 0;
		if (d == k) return 1;
		return max(2LL, (d + k - 1) / k);
	}
	
	if (d == 0) return 0;
	if (d == k) return 1;
	if (d % 2 == 0 && d <= 2 * k) return 2;
	
	int res = max(3LL, (d + k - 1) / k);
	if (res % 2 != d % 2) res++;
	return res;
}

int K, X, Y;

//(x, y) -> (X, Y)の最短手数. 45°回転後.
int score(int x, int y) {
	return eval(X - x, Y - y, K);
}

//scoreが小さくなる方向へ移動する.
vector<P> solve1() {
	int nowX = 0;
	int nowY = 0;
	int nowEval = eval(X, Y, K);
	vector<P> ret;
	
	while (nowEval > 0) {
		int nextX;
		int nextY;
		int dx, dy;
		
		for (dx = -K; dx <= K; dx++) {
			if (score(nowX + dx, nowY + K) < nowEval) {
				nextX = nowX + dx;
				nextY = nowY + K;
				break;
			}
			if (score(nowX + dx, nowY - K) < nowEval) {
				nextX = nowX + dx;
				nextY = nowY - K;
				break;
			}
		}
		
		for (dy = -K; dy <= K; dy++) {
			if (score(nowX + K, nowY + dy) < nowEval) {
				nextX = nowX + K;
				nextY = nowY + dy;
				break;
			}
			if (score(nowX - K, nowY + dy) < nowEval) {
				nextX = nowX - K;
				nextY = nowY + dy;
				break;
			}
		}
		
		nowX = nextX;
		nowY = nextY;
		ret.push_back(P(nowX, nowY));
		nowEval--;
	}
	return ret;
}

bool isOnRect(int x, int y, int K) {
	x = abs(x);
	y = abs(y);
	if (max(x, y) != K) return false;
	return true;
}

//方針はsolve1と同じだが、|x| + |y| < Kを生かして、候補点の個数をO(1) (定数重い)に減らす.
vector<P> solve2() {
	int nowX = 0;
	int nowY = 0;
	int nowEval = eval(X, Y, K);
	vector<P> ret;
	
	while (nowEval > 0) {
		vector<int> xs;
		vector<int> ys;
		int i, j;
		
		for (i = -2; i <= 2; i++) {
			xs.push_back(nowX + K + i);
			xs.push_back(nowX - K + i);
			xs.push_back(X + K + i);
			xs.push_back(X - K + i);
			xs.push_back(X + i);
			xs.push_back(nowX + i);
		}
		
		for (i = -2; i <= 2; i++) {
			ys.push_back(nowY + K + i);
			ys.push_back(nowY - K + i);
			ys.push_back(Y + K + i);
			ys.push_back(Y - K + i);
			ys.push_back(Y + i);
			ys.push_back(nowY + i);
		}
		
		int nextX;
		int nextY;
		
		rep(i, xs.size()) {
			rep(j, ys.size()) {
				int x = xs[i];
				int y = ys[j];
				
				if (!isOnRect(x - nowX, y - nowY, K)) continue;
				
				if (score(x, y) < nowEval) {
					nextX = x;
					nextY = y;
					break;
				}
			}
			if (j < ys.size()) break;
		}
		
		nowX = nextX;
		nowY = nextY;
		ret.push_back(P(nowX, nowY));
		
		nowEval--;
	}
	return ret;
}

signed main() {
	cin >> K >> X >> Y;
	if (K % 2 == 0 && (abs(X) + abs(Y)) % 2 == 1) { cout << -1 << endl; return 0; }
	rot45(X, Y);
	
	vector<P> ans;
	if (K <= 300000) { ans = solve1(); }
	else { ans = solve2(); }
	
	int i;
	printf("%lld\n", (int)ans.size());
	rep(i, ans.size()) {
		int x = ans[i].first;
		int y = ans[i].second;
		inv45(x, y);
		printf("%lld %lld\n", x, y);
	}
	return 0;
}

Measured memory_bytes: 5872