#include "bits/stdc++.h" using namespace std; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i)) #define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i)) static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL; typedef vector vi; typedef pair pii; typedef vector > vpii; typedef long long ll; template static void amin(T &x, U y) { if (y < x) x = y; } template static void amax(T &x, U y) { if (x < y) x = y; } int main() { int A; int B; int C; int D; while (~scanf("%d%d%d%d", &A, &B, &C, &D)) { int swapped = 0; if (A < B) swap(A, B), swapped = 1; int N; vpii edges; if (A == B && B == C) { if (A == 1) { N = -1; } else { N = 2 + (A - 2); edges.emplace_back(0, 1); edges.emplace_back(1, 0); rep(i, A - 2) edges.emplace_back(i == 0 ? 0 : 2 + i - 1, 2 + i); } } else if (B == C) { N = 2 + (A - B - 1) + (B - 1); rep(i, A - B - 1) edges.emplace_back(i == 0 ? 0 ^ swapped : 2 + i - 1, 2 + i); edges.emplace_back(0 ^ swapped, 1 ^ swapped); rep(i, B - 1) edges.emplace_back(i == 0 ? 1 ^ swapped : 2 + (A - B - 1) + i - 1, 2 + (A - B - 1) + i); } else { N = 2 + (A - 1) + (B - C - 1); rep(i, A - 1) edges.emplace_back(i == 0 ? 0 ^ swapped : 2 + i - 1, 2 + i); rep(i, B - C - 1) edges.emplace_back(i == 0 ? 1 ^ swapped : A + 1 + i - 1, A + 1 + i); if (0 < C) edges.emplace_back(1 ^ swapped, 2 + (A - C - 1)); } if (N == -1 || (int)edges.size() > D) { puts("-1"); } else { printf("%d %d\n", N, (int)edges.size()); for (int i = 0; i < (int)edges.size(); ++i) printf("%d %d\n", edges[i].first, edges[i].second); } } return 0; }