#include using namespace std; using ll = long long; string keys[] = {"Overflow", "Zero", "Safe"}; void solve() { ll v, x, fo, fi, q, r; cin >> v >>x >> fo >> fi >> q >> r; if (fi < fo) { cout << keys[1] << endl; return; } ll y = x + (fi - fo) * r; ll z = y - (fo * (q - r)); if (y > v) { cout << keys[0] << endl; return; } cout << (z < x ? keys[1] : (z > x ? keys[0] : keys[2])) << endl; } int main () { int T; cin >> T; while (T--) { solve(); } }