#include <bits/stdc++.h>
using namespace std;

long long int N, h, a[100001], s, t, i;

int main(){
    scanf("%lld%lld", &N, a);
    h = N * 1000000000LL;
    a[N] = *a;
    s = *a;
    for(; ++i < N;){
        scanf("%lld", a + i);
        s += a[i];
    }
    if(s % (N * (N + 1) / 2))return 0 & puts("NO");
    s /= (N * (N + 1) / 2);
    for(i = 0; i < N; ++i){
        t += (a[i] - a[i + 1] + s) / N;
        if((a[i] - a[i + 1] + s) < 0 || (a[i] - a[i + 1] + s) % N != 0)return 0 & puts("NO");
    }
    puts(((t + h) % N != (s + h) % N) ? "NO" : "YES");
    return 0;
}
