#include <iostream>
#include <cstdio>
#include <vector>
#include <cstring>
#include <algorithm>
#include <vector>

#define TESTING0

using namespace std;

int main() {

#ifdef TESTING
	freopen("grafc.in", "r", stdin);
	freopen("grafc.out", "w", stdout);
#endif

	ios_base::sync_with_stdio(false);
	cin.tie(0);

	int k, m, n;
	cin >> k >> m >> n;

	if (n != 1 && m != 1) {
		cout << -1;
		return 0;
	}

	if (n == 1)
		swap(n, m);

	vector< pair<int, int> > sol;
	for (int i = 1; i <= k - n; ++i)
		sol.push_back(make_pair(i, i + 1));

	cout << sol.size() << '\n';
	for (auto& it : sol)
		cout << it.first << ' ' << it.second << '\n';

	return 0;

}

//Trust me, I'm the Doctor!