#include using namespace std; int main() { int T; cin >> T; for(int i=0;i> V >> X >> Fo >> Fi >> Q >> R; long long tmp=X; X+=(Fi-Fo)*R; if(X>V){ cout << "Overflow" << endl; continue; } if(X<=0){ cout << "Zero" << endl; continue; } X-=Fo*(Q-R); if(tmp==X){ cout << "safe" << endl; } else if(tmp>X){ cout << "Zero" << endl; } else{ cout << "Overflow" << endl; } } }