type Range = (Int, Int)

main:: IO ()
main = do
    [n,a,b,c,d] <- (map read . words) <$> getLine
    putStrLn $ if solve (n-1) (b-a) (c,d) then "YES" else "NO"

-- |
--
-- >>> solve 4 4 (2,4)
-- True
--
-- >>> solve 3 (-1) (4,5)
-- False
--
-- >>> solve 48791 (681218449-105960835) (90629745,90632170)
-- False
solve :: Int -> Int -> (Int, Int) -> Bool
solve n' k (c,d) = any f [n'*c, n'*c-(c+d) .. 0]
  where
    k' = abs k
    f x = x <= k' && k' <= x+(d-c)*n'

ok :: Int -> Range -> Bool
x `ok` (xmin, xmax)
  | x > 0     = xmin <= x && x <= xmax
  | otherwise = (-xmax) <= x && x <= (-xmin)
