# Qの1サイクルを見れば結論わかる、先に流入なので1サイクル内はOK # R*(I-O)+(Q-R)*(-O) T = int(input()) for t in range(T): V, X, O, I, Q, R = map(int, input().split()) calc = R*(I-O)-(Q-R)*O if calc == 0: print('Safe') elif calc > 0: print('Overflow') elif calc < 0: print('Zero')