def Map(): return list(map(int,input().split())) def solve(): V,X,F,f,Q,R = Map() if f*R - Q*F > 0: ans = 'Overflow' elif f*R - Q*F < 0: ans = 'Zero' if X + (f - F)*R > V: ans = 'Overflow' else: ans = 'Safe' if X + (f - F)*R > V: ans = 'Overflow' print(ans) return T = int(input()) for i in range(T): solve()