import Data.Bool

main = do
 [n,a,b,c,d] <- map read . words <$> getLine :: IO [Integer]
 putStrLn $ bool "NO" "YES" $ moderate n a b c d

moderate n a b c d = any (within b) [(a + i*d + j*c, a + i*c + j*d) | i<-[-(n-1)..0], let j = (n-1) - abs i]

within x (a,b) = a <= x && x <= b