function main() t = int(input()) for _ = 1:t v, x, fo, fi, q, r = int(inputs()) if x + (fi - fo) * r - fo * (q - r) == x println("Safe") elseif x + (fi - fo) * r - fo * (q - r) < x println("Zero") else println("Overflow") end end end # --------input func---------- input() = readline() inputs() = split(readline()) int(s::AbstractChar) = parse(Int, s) int(s::AbstractString) = parse(Int, s) int(v::AbstractArray) = map(x -> parse(Int, x), v) debug(x...) = println(stderr, x...) isfile("myinput.txt") && (mystdin = open("myinput.txt", "r"); redirect_stdin(mystdin)) main() @isdefined(mystdin) && close(mystdin)