def solve(): V, X, F_out, F_in, Q, R = map(int, input().split()) F_sunny, F_rainy = - F_out, F_in - F_out if X + R * F_rainy > V: print("Overflow") return diff = R * F_rainy + (Q - R) * F_sunny if diff < 0: print("Zero") elif diff > 0: print("OverFlow") else: print("Safe") T = int(input()) for _ in range(T): solve()