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 = [(x, x+(d-c)*k) | x <- [k*c, k*c-(c+d) .. 0]]

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