main:: IO ()
main = do
    [n,a,b,c,d] <- (map read . words) <$> getLine
    putStrLn $ if solve (n-1) (b-a) (c,d) then "YES" else "NO"

solve :: Int -> Int -> (Int, Int) -> Bool
solve n' k (c,d) = any f [n'*d, n'*d-(c+d) .. 0]
  where
    k' = abs k
    f x = x-(d-c)*n' <= k' && k' <= x

ok :: Int -> (Int,Int) -> Bool
x `ok` (xmin, xmax)
  | x > 0     = xmin <= x && x <= xmax
  | otherwise = (-xmax) <= x && x <= (-xmin)
