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