#include <bits/stdc++.h>
using namespace std;
typedef long long   signed int LL;
typedef long long unsigned int LU;
#define incID(i, l, r) for(LL i = (l)    ; i <  (r); ++i)
#define incII(i, l, r) for(LL i = (l)    ; i <= (r); ++i)
#define decID(i, l, r) for(LL i = (r) - 1; i >= (l); --i)
#define decII(i, l, r) for(LL i = (r)    ; i >= (l); --i)
#define inc(i, n)  incID(i, 0, n)
#define inc1(i, n) incII(i, 1, n)
#define dec(i, n)  decID(i, 0, n)
#define dec1(i, n) decII(i, 1, n)
#define inID(v, l, r) ((l) <= (v) && (v) <  (r))
#define inII(v, l, r) ((l) <= (v) && (v) <= (r))
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define  ALL(v)  v.begin(),  v.end()
#define RALL(v) v.rbegin(), v.rend()
template<typename T> bool setmin  (T & a, T b) { if(b <  a) { a = b; return true; } else { return false; } }
template<typename T> bool setmax  (T & a, T b) { if(b >  a) { a = b; return true; } else { return false; } }
template<typename T> bool setmineq(T & a, T b) { if(b <= a) { a = b; return true; } else { return false; } }
template<typename T> bool setmaxeq(T & a, T b) { if(b >= a) { a = b; return true; } else { return false; } }
LL mo(LL a, LL b) { assert(b > 0); a %= b; if(a < 0) { a += b; } return a; }
LL fl(LL a, LL b) { assert(b > 0); return (a > 0 ? a / b : (a - b + 1) / b); }
LL ce(LL a, LL b) { assert(b > 0); return (a < 0 ? a / b : (a + b - 1) / b); }
template<typename T> T gcd(T a, T b) { return (b == 0 ? a : gcd(b, a % b)); }
template<typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }
#define bit(b, i) (((b) >> (i)) & 1)
#define BC __builtin_popcountll
#define SC static_cast
#define SI(v) SC<int>(v.size())
#define SL(v) SC<LL >(v.size())
#define RF(e, v) for(auto & e: v)
#define ef else if
#define UR assert(false)

// ---- ----

pair<int, int> f(int k, int x, int y) {
	int d = abs(x) + abs(y);
	assert(d <= 2 * k);
	assert(d % 2 == 0);
	
	bool X = (x < 0);
	bool Y = (y < 0);
	
	x = abs(x);
	y = abs(y);
	
	pair<int, int> ans = { x, y };
	
	if(x >= y) {
		if(d <= k) {
			int r = d / 2;
			ans.FI -= r;
			ans.SE += k - r;
		} else {
			int r = k - d / 2;
			ans.FI -= k - r;
			ans.SE += r;
		}
	} else {
		if(d <= k) {
			int r = d / 2;
			ans.FI += k - r;
			ans.SE -= r;
		} else {
			int r = k - d / 2;
			ans.FI += r;
			ans.SE -= k - r;
		}
	}
	
	if(X) { ans.FI *= -1; }
	if(Y) { ans.SE *= -1; }
	
	return ans;
}

int k, x, y;

int main() {
	cin >> k >> x >> y;
	
	if(k % 2 == 0 && (abs(x) + abs(y)) % 2 != 0) {
		cout << -1 << endl;
		return 0;
	}
	
	vector<pair<int, int>> ans;	
	while(true) {
		ans.EB(x, y);
		int d = abs(x) + abs(y);
		if(d == k) { break; }
		
		if(
			(k % 2 == 0 && d <= 2 * k) ||
			(k % 2 != 0 && (
				((d <= k) || (d <= 2 * k && d % 2 == 0))
			))
		) {
			if(d <= k && d % 2 != 0) { x += k; continue; }
			auto p = f(k, x, y);
			x = p.FI;
			y = p.SE;
		} else {
			bool A = (x >= +y);
			bool B = (x >= -y);
			
			if(  A &&   B) { x -= k; }
			if(! A && ! B) { x += k; }
			if(! A &&   B) { y -= k; }
			if(  A && ! B) { y += k; }
		}
	}
	
	reverse(ALL(ans));
	cout << SI(ans) << "\n";
	RF(e, ans) { cout << e.FI << " " << e.SE << "\n"; }
	
	
	reverse(ALL(ans));
	ans.EB(0, 0);
	reverse(ALL(ans));
	inc(i, SI(ans) - 1) {
		assert(abs(ans[i].FI - ans[i + 1].FI) + abs(ans[i].SE - ans[i + 1].SE) == k);
	}
	
	return 0;
}


Measured memory_bytes: 4208