for _ in range(int(input())): v, x, fo, fi, q, r = map(int, input().split()) if fi < fo: print('Zero') else: add = (fi - fo) * r sub = fo * (q - r) print('Overflow' if add > sub or x + add > v else 'Zero' if add < sub else 'Safe')