import Data.List (nub)

type Range = (Int, Int)

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 4 4 (2,4)
-- True
--
-- >>> solve 3 (-1) (4,5)
-- False
solve :: Int -> Int -> (Int, Int) -> Bool
solve n' k (c,d) = any (ok k) ranges
  where ranges = iterate (expand (c,d)) [(0,0)] !! n'

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

expand :: Range -> [Range] -> [Range]
expand (c,d) ranges = nub $ concat [[(c, d) `join` x, (-d,-c) `join` x] | x <- ranges]

join :: Range -> Range -> Range
(xmin, xmax) `join` (ymin, ymax) = (xmin + ymin, xmax + ymax)
