#include<bits/stdc++.h> using namespace std; int main(){ int n=20; while(n--){ double A,B; double d1,d2,d3,d4; cin>>d1>>d2>>d3>>d4; if(d1>10) d1=0.5; if(d2>10) d2=0.5; A=d1+d2; if(A>10.5) A=0; if(d3>10) d3=0.5; if(d4>10) d4=0.5; B=d1+d2; if(B>10.5) B=0; if(A>B) cout<<"1"; else if(A==B) cout<<"0"; else cout<<"-1"; } return 0; }