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