#include using namespace std; #define int long long int a,b,c,d; int n,m; vector > p; int cnt=2; signed main() { /*freopen("hometown.in","r",stdin); freopen("hometown.out","w",stdout);*/ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin>>a>>b>>c>>d; n=a+b-c; m=n-1; if(!c) m--; if(a==c&&b==c) m=n; if(n<2||m>d) return cout<<"-1",0; if(a==c&&b==c) { for(int i=0;i0) { int flag=0; if(c==a) { p.push_back({1,0}); flag=0; } else if(c==b) { p.push_back({0,1}); flag=1; } else { p.push_back({0,cnt}); p.push_back({1,cnt}); flag=cnt++; } for(int i=cnt;i