#include #include #include #include #include #include #include #include #include #include #include #include #include #define _repargs(_1,_2,_3,name,...) name #define _rep(i,n) repi(i,0,n) #define repi(i,a,b) for(int i=(int)(a);i<(int)(b);++i) #define rep(...) _repargs(__VA_ARGS__,repi,_rep,)(__VA_ARGS__) #define all(x) (x).begin(),(x).end() #define mod 1000000007 #define inf 2000000007 #define mp make_pair #define pb push_back typedef long long ll; using namespace std; template inline void output(T a, int p = 0) { if(p) cout << fixed << setprecision(p) << a << "\n"; else cout << a << "\n"; } // end of template int main() { cin.tie(0); ios::sync_with_stdio(0); // source code int A, B, C, D; cin >> A >> B >> C >> D; A -= C, B -= C; if(C > 0 && D < A + B + C - 1){ output(-1); return 0; } if(C == 0 && D < A + B + C - 2){ output(-1); return 0; } vector> ret; int cur = 2; int a_tail = 0; int b_tail = 1; rep(i, A - 1){ ret.pb(mp(a_tail, cur)); a_tail = cur; cur++; } rep(i, B - 1){ ret.pb(mp(b_tail, cur)); b_tail = cur; cur++; } if(C){ ret.pb(mp(a_tail, cur)); ret.pb(mp(b_tail, cur)); b_tail = cur; cur++; rep(i, C - 1){ ret.pb(mp(b_tail, cur)); b_tail = cur; cur++; } } cout << cur << " " << ret.size() << endl; for(auto r: ret){ cout << r.first << " " << r.second << endl; } return 0; }