#include "bits/stdc++.h"
using namespace std;
typedef long long LL;
LL A[100000];
int main() {
	LL N;
	cin >> N;
	LL sum = 0;
	for (int i = 0; i < N; i++) {
		cin >> A[i];
		sum += A[i];
	}
	LL a = N*(N + 1) / 2;
	if (sum%a) {
		cout << "NO" << endl;
		return 0;
	}
	LL k = sum / a;
	for (int i = 0; i < N; i++) {
		LL d = A[(i + 1) % N] - A[i];
		if (d > k || (k - d) % N) {
			cout << "NO" << endl;
			return 0;
		}
	}
	cout << "YES" << endl;
}