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

    let dif = d - c
        dmax = 2 * d
        dmin = 2 * c

        -- a' = if odd n then a else a + close c d a b
        n' = if odd n then n else n - 1

    let
        go _ x | x == b
               = x
        go 0 x = x
        go i x | diff x b >= dmin
               = go (i - 1) (x + close dmin dmax x b)
        go i x = go (i - 1) (x + close 0 dif x b)

        r = go ((n' - 1) `div` 2) a

        r' = map (go ((n' - 1) `div` 2)) [a - c, a + c, a - d, a + d]

        -- r' = if odd n then r else r + close c d r b

        rr = if odd n then r == b else b `elem` r'

        -- go _ x | x == b = x
        -- go 0 x = x
        -- go i x = go (i - 1) (x + close c d x b)

    putStrLn $ if rr then "YES" else "NO"
    -- putStrLn $ if go (n - 1) a == b then "YES" else "NO"


close :: Integer -> Integer -> Integer -> Integer -> Integer
close c d x y | diff x y <= c
    = if y - x > 0 then c else -c
close c d x y | diff x y >= d
    = if y - x > 0 then d else -d
close c d x y = y - x

diff :: Integer -> Integer -> Integer
diff x y = abs (x - y)
