import Data.Bool (bool)

main :: IO ()
main = do
    n  <- read <$> getLine
    xs <- map read . words <$> getLine
    answer $ solve n xs

type Answer = Bool
answer :: Answer -> IO ()
answer = putStrLn . bool "NO" "YES"

solve :: Int -> [Int] -> Answer
solve n as = inner True (as ++ [head as])
  where
    s = (n * n + n) `div` 2
    k = sum as `div` s
    inner correct (xa : xb : xs)
      | null xs   = correct && correct'
      | otherwise = correct && inner correct' (xb : xs)
      where
        d = xb - xa - k
        correct' = d <= 0 && d `mod` n == 0
