#include <cstdio>
#include <algorithm>
using namespace std;

const int MAXN = 100003;
int A[MAXN], B[MAXN];

int main() {
	int n;
	scanf("%d", &n);
	long long s = 0;
	for(int i = 1; i <= n; i++) {
		scanf("%d", A + i);
		s += A[i];
		B[i] = A[i] - A[i - 1];
	}
	B[1] = A[1] - A[n];
	bool fg = 1;
	long long t = (long long)(n + 1) * n / 2;
	if(s % t) fg = 0;
	s /= t;
	for(int i = 1; i <= n; i++) {
		B[i] -= s;
		if(B[i] % n || A[i] < s) {
			fg = 0;
			break;
		}
	}
	if(fg) puts("YES");
	else puts("NO");
	return 0;
}
