#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<cmath>
#include<iostream>
#define LL long long
#define N 110000
using namespace std;
int n;
LL a[N],d[N],k;
int main()
{
	scanf("%d",&n);
	for(int i=1;i<=n;i++) {scanf("%lld",&a[i]);k+=a[i];}
	LL t=1ll*n*(n+1)/2;
	if(k%t) {printf("NO\n");return 0;}
	k/=t;
	a[0]=a[n];
	for(int i=1;i<=n;i++) d[i]=a[i]-a[i-1];
	t=0;
	for(int i=1;i<=n;i++)
	{
		LL tmp=k-d[i];
		if(tmp<0 || tmp%n) {printf("NO\n");return 0;}
		t+=tmp/n;
	}
	if(t!=k) printf("NO\n");
	else printf("YES\n");
	return 0;
}