#include <map>
#include <set>
#include <cmath>
#include <ctime>
#include <stack>
#include <queue>
#include <cstdio>
#include <cctype>
#include <bitset>
#include <string>
#include <vector>
#include <climits>
#include <cstring>
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <functional>
#define fuck(x) cout<<"["<<x<<"]";
#define FIN freopen("input.txt","r",stdin);
#define FOUT freopen("output.txt","w+",stdout);
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;

const int MX = 1e5 + 5;
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;

int n;
LL A[MX], B[MX], sum;

bool solve() {
    LL tot = (LL)(1 + n) * n / 2;
    if(sum % tot != 0) return 0;

    LL k = sum / tot, used = 0;
    for(int i = 1; i <= n; i++) {
        int last = i == 1 ? n : i - 1;
        B[i] = A[i] - A[last];

        if((k - B[i]) % n != 0 || (k - B[i]) < 0) {
            return 0;
        }
        used += (k - B[i]) / n;
    }
    return used == k;
}

int main() {
    // FIN;
    scanf("%d", &n);
    for(int i = 1; i <= n; i++) {
        scanf("%lld", &A[i]);
        sum += A[i];
    }
    printf("%s\n", solve() ? "YES" : "NO");
    return 0;
}