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 :: Int -> Int -> (Int, Int) -> Bool
solve n' k (c,d) = any f [n'*d, n'*d-(c+d) .. 0]
  where f x = x-(d-c)*n' <= abs k && abs k <= x