-- Question B time over

import Control.Applicative
import Control.Monad

main = do
  [n,a,b,c,d] <- (map read . words) <$> getLine 
  putStrLn $ check n a b c d 

check :: Int -> Int -> Int -> Int -> Int -> String
check n a b c d 
 | (elem b ([ a+x | k <- [0..n] , x <- [(k*c-(n-k)*d)..(k*d-(n-k)*c)])) ==True = "YES"
 | otherwise = "NO"
 