def solve(): V, X, F_out, F_in, Q, R = map(int, input().split()) assert 1 <= X <= V <= 10**18 assert 1 <= F_out <= 10**9 assert 1 <= F_in <= 10**9 assert 1 <= R < Q <= 10**9 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()) assert 1 <= T <= 1000 for _ in range(T): solve()