def solve(): v, x, fo, fi, q, r = [int(y) for y in input().split()] fd = fi - fo if x + fd * r > v: return "Overflow" elif x + fi * r - fo * q <= 0: return "Zero" elif fd > 0: return "Overflow" elif fd < 0: return "Zero" else: return "Safe" t = int(input()) for _ in range(t): print(solve())