Scanf.scanf "%d %d %d %d %d" (fun n a b c d ->
    let rec loop m =
        if m = n then false else
            let q = (n - 1) * m in
            if c * q - d * m <= b - a &&
               d * q - c * m >= b - a then true else loop (m + 1)
    in
    print_endline @@ if loop 0 then "YES" else "NO"
)