
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)

    putStrLn $ if go ((n' - 1) `div` 2) 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)
