#include<bits/stdc++.h>

using namespace std;

int N, a[100009];
long long s;

int main ()
{
//freopen ("input", "r", stdin);
//freopen ("output", "w", stdout);

scanf ("%d", &N);
for (int i=0; i<N; i++)
    scanf ("%d", &a[i]), s += a[i];
long long u = 1LL * N * (N + 1) / 2;
if (s % u != 0 || s / u > 1e9)
{
    printf ("NO\n");
    return 0;
}
int steps = s / u;
for (int i=0; i<N; i++)
{
    int curr = a[(i + 1) % N] - a[i] - steps;
    if (curr % N != 0 || curr > 0)
    {
        printf ("NO\n");
        return 0;
    }
}
printf ("YES\n");
return 0;
}
