local mma = math.max
local mfl, mce, mmi = math.floor, math.ceil, math.min

local n = io.read("*n")
local a = {}
for i = 1, n do
  a[i] = io.read("*n")
end
if n == 1 then print("YES") os.exit() end

local sum = 0
local mod = mfl(n * (n + 1) / 2)
local cnt = 0
for i = 1, n do
  cnt = cnt + mfl((sum + a[i]) / mod)
  sum = (sum + a[i]) % mod
end
if sum ~= 0 then print("NO") os.exit() end

local b = {}
for i = 1, n - 1 do
  b[i] = a[i + 1] - a[i]
end
b[n] = a[1] - a[n]

for i = 1, n do
  b[i] = b[i] - cnt
end

for i = 1, n do
  if 0 < b[i] then cnt = -1 break end
  local v = -b[i]
  if v % n ~= 0 then cnt = -1 break end
  cnt = cnt - mfl(v / n)
end
print(cnt == 0 and "YES" or "NO")
