#include using namespace std; int main() { int a, b, c, d; cin >> a >> b >> c >> d; a -= c; b -= c; if (c == 0) { vector u, v; for (int i = 0; i < a - 1; i++) { u.push_back(i); v.push_back(i + 2); } for (int i = 0; i < b - 1; i++) { u.push_back(i + 1); v.push_back(i + 3); } if (u.size() > d) { cout << -1 << endl; return 0; } cout << 1010101 << " " << u.size() << endl; for (int i = 0; i < u.size(); i++) { cout << u[i] << " " << v[i] << endl; } } else if (a == 0) { vector u, v; for (int i = 0; i < b - 1; i++) { u.push_back(i + 1); v.push_back(i + 3); } u.push_back((b - 1) * 2 + 1); v.push_back(0); for (int i = 0; i < c - 1; i++) { u.push_back(i * 2 + 0); v.push_back(i * 2 + 2); } if (u.size() > d) { cout << -1 << endl; return 0; } cout << 1010101 << " " << u.size() << endl; for (int i = 0; i < u.size(); i++) { cout << u[i] << " " << v[i] << endl; } } else if (b == 0) { vector u, v; for (int i = 0; i < a - 1; i++) { u.push_back(i + 0); v.push_back(i + 2); } u.push_back((a - 1) * 2); v.push_back(1); for (int i = 0; i < c - 1; i++) { u.push_back(i * 2 + 1); v.push_back(i * 2 + 3); } if (u.size() > d) { cout << -1 << endl; return 0; } cout << 1010101 << " " << u.size() << endl; for (int i = 0; i < u.size(); i++) { cout << u[i] << " " << v[i] << endl; } } else { vector u, v; for (int i = 0; i < a; i++) { u.push_back(i * 2); v.push_back(i * 2 + 2); } for (int i = 0; i < b; i++) { u.push_back(i * 2 + 1); v.push_back(i * 2 + 3); } u.push_back(a * 2); v.push_back(505050); u.push_back(b * 2 + 1); v.push_back(505050); for (int i = 0; i < c - 1; i++) { u.push_back(505050 + i); v.push_back(505050 + i + 1); } if (u.size() > d) { cout << -1 << endl; return 0; } cout << 1010101 << " " << u.size() << endl; for (int i = 0; i < u.size(); i++) { cout << u[i] << " " << v[i] << endl; } } }