T = int(input()) for _ in range(T): V, X, Fo, Fi, Q, R = map(int, input().split()) o = Fo * Q i = Fi * R if o > i: print("Zero") if o < i: print("Overflow") if o == i: print("Safe")