T = int(input()) for _ in range(T): V, X, Fo, Fi, Q, R = map(int, input().split()) if X+(Fi-Fo)*R > V: print("Overflow") continue A = (Fi-Fo)*R-Fo*(Q-R) if A == 0: print("Safe") elif A > 0: print("Overflow") else: print("Zero")