#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); int T; cin >> T; while(T--){ ll v, x, f0, f1, q, r, f2; cin >> v >> x >> f0 >> f1 >> q >> r; f2 = f1 - f0; if(x + f2 * r > v){ cout << "Overflow\n"; continue; } ll d = f2 * r - f0 * (q - r); if(x + d <= 0){ cout << "Zero\n"; continue; } if(d > 0){ cout << "Overflow\n"; }else if(d < 0){ cout << "Zero\n"; }else{ cout << "Safe\n"; } } }