#include<bits/stdc++.h>
using namespace std;
inline int read(){
	int x=0,f=1;char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=(x<<3)+(x<<1)+ch-'0';ch=getchar();}
	return x*f;
}
#define MN 100005
long long sum,n,a[MN];
int main(){
	n=read();register int i;
	for(i=1;i<=n;i++) a[i]=read(),sum+=a[i];
	if(sum%((n+n*n)/2)!=0){printf("NO\n");return 0;}
	long long nn=sum/((n+n*n)/2);
	a[n+1]=a[1];
	for(i=1;i<=n;i++){
		nn+=(a[i+1]-a[i]-nn)/n;
		if(nn<0){
			printf("NO\n");
			return 0;	
		}
	}
	if(nn) {printf("NO\n");return 0;}
	printf("YES\n");
	return 0;
}
