import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric;

void main()
{
    auto N = readln.chomp.to!long;
    auto AS = readln.split.to!(long[]);
    long sum_a;
    foreach (a; AS) sum_a += a;
    auto d = (N+1) * N / 2;
    if (sum_a % d != 0) {
        writeln("NO");
        return;
    }
    auto n = sum_a / d;

    d = 0;
    foreach (i; 0..N) {
        auto a = AS[i] - AS[(i+1)%N];
        if (a+n >= 0 && (a+n) % N != 0) {
            writeln("NO");
            return;
        }
        d += a;
    }
    
    writeln(d == 0 ? "YES" : "NO");
}
