
main :: IO ()
main = do
    [n,a,b,c,d] <- getInts
    putStrLn $ if solve n a b c d then "YES" else "NO"

getInts :: IO [Int]
getInts = map read . words <$> getLine

solve :: Int -> Int -> Int -> Int -> Int -> Bool
solve n a b c d
    | abs b > a + d*(n-1) = False
    | otherwise = or [b `elem` [a+c*i+d*(n-1-i)
                               ,a-c*i+d*(n-1-i)
                               ,a+c*i-d*(n-1-i)
                               ,a-c*i-d*(n-1-i)] | i<-[0..n-1]]
