// #include #include using namespace std; using namespace atcoder; using ll = long long; #define rep(i, n) for (int i=0; i<(int)(n); ++(i)) #define rep3(i, m, n) for (int i=(m); (i)<(int)(n); ++(i)) #define repr(i, n) for (int i=(int)(n)-1; (i)>=0; --(i)) #define rep3r(i, m, n) for (int i=(int)(n)-1; (i)>=(int)(m); --(i)) #define all(x) (x).begin(), (x).end() const int INF = (int)(1e9); int main() { int t0; cin >> t0; rep(i0, t0) { ll v, x; int fo, fi, q, r; cin >> v >> x >> fo >> fi >> q >> r; if (x+(ll)(fi-fo)*r > v) cout << "Overflow" << endl; else if (x+(ll)(fi-fo)*r-(ll)fo*(q-r) <= 0) cout << "Zero" << endl; else if ((ll)(fi-fo)*r-(ll)fo*(q-r) > 0) cout << "Overflow" << endl; else if ((ll)(fi-fo)*r-(ll)fo*(q-r) < 0) cout << "Zero" << endl; else cout << "Safe" << endl; } return 0; }