N = int(input()) for i in range(N): V, X, Fo, Fi, Q, R = map(int, input().split()) C = Fi * R - Fo * Q if C > 0: print("Overflow") elif C < 0: print("Zero") else: print("Safe")