let () = print_endline @@ Scanf.scanf "%d %d %d %d %d" (fun n a b c d ->
  Array.init n (fun i -> (i * c - (n - 1 - i) * d, i * d - (n - 1 - i) * d))
  |> Array.to_list
  |> List.exists (fun (min, max) -> min <= abs (a - b) && abs (a - b) <= max)
  |> function true -> "YES" | false -> "NO")