#include using namespace std; int main() { int T; cin >> T; for (int i = 0;i> V >> X >> F1 >> F2 >> Q >> R; int64_t ol; ol = (R * F2) - (Q * F1); if (V < R * (F2- F1) + X) { cout << "Overflow" << endl; continue; } if (ol < 0) { cout << "Zero" << endl; } else if (ol == 0) { cout << "Safe" << endl; } else { cout << "Overflow" << endl; } } }