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