#include <cstdio>
long long n, n2, s, k, d, a[100005];
int main() {
	int i;
	scanf("%d", &n);
	for (i=0; i<n; i++) scanf("%d", &a[i]), s += a[i];
	n2 = n * (n+1) / 2;
	if (s%n2) {puts("NO"); return 0;}
	k = s / n2;
	for (i=s=0; i<n; i++) {
		d = a[(i+1)%n] - a[i];
		if (k<d || (k-d)%n) {puts("NO"); return 0;}
		s += (k-d) / n;
	}
	puts(s==k ? "YES":"NO");
	return 0;
}