#include using namespace std; void fast_io() { ios::sync_with_stdio(false); std::cin.tie(nullptr); } void solve() { long long v, x, fo, fi, q, r; cin >> v >> x >> fo >> fi >> q >> r; long long ma = max(x, x + r * (fi - fo)); long long la = x + r * fi - q * fo; if (ma > v) { cout << "Overflow" << endl; } else if (la <= 0) { cout << "Zero" << endl; } else if (la > x) { cout << "Overflow" << endl; } else if (la == x) { cout << "Safe" << endl; } else { cout << "Zero" << endl; } } int main() { fast_io(); int t; cin >> t; for (; t--;) { solve(); } }