import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.stdio, std.bitmanip;


void main() {
    auto N = readln.chomp.to!int;
    auto A = readln.split.map!(to!int).array;

    bool ans = true;
    while (true) {
        if (all!"a == 0"(A))
            break;

        int mv = 10^^9+1;
        int mi = -1;
        foreach (i; 0..N) {
            if (A[i] < mv) {
                mv = A[i];
                mi = i;
            }
        }
        if (mv < 0) {
            ans = false;
            break;
        }

        foreach (i; 0..N) {
            A[(i+mi)%N] -= i+1;
        }
    }

    writeln(ans ? "YES" : "NO");
}
