#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(int i=0;i> T; while(T--){ ll V,X,F0,F1,Q,R; cin >> V >> X >> F0 >> F1 >> Q >> R; ll x=R*F1-Q*F0; if(x>0) cout << "Overflow" << endl; else if(x==0) cout << "Safe" << endl; else cout << "Zero" << endl; } return 0; }