let () = print_endline @@ Scanf.scanf "%d %d %d %d %d" (fun n a b c d ->
  if abs (a - b) <= d * (n - 1) then begin
    let bigstep, gap =
      let bigstep, gap = abs (a - b) / d, abs (a - b) mod d in
      if (n - 1 - bigstep) mod 2 = 0 then (bigstep, gap)
      else if c <= gap && gap <= d then (bigstep + 1, 0)
      else (bigstep + 1, List.fold_left min (abs (gap + c)) [abs (gap + d); abs (gap - c); abs (gap - d)]) in
    let smallstep = (n - 1 - bigstep) / 2 in
    if gap <= smallstep * (d - c) then "YES"
    else "NO"
  end else "NO")