#include <bits/stdc++.h>
#define F(i,j,k) for(int i=(j);i<=(k);++i)
using namespace std;
#define ll long long
const int N =1e5+5;
int n;
ll w[N],sum,num;
int main(){
	//freopen("txt.in","r",stdin);freopen("txt.out","w",stdout);
	scanf("%d\n",&n);
	F(i,1,n)scanf("%lld",&w[i]),sum+=w[i];
	if(sum%((ll)n*(n+1)/2))printf("NO\n");
	else{
		num=sum/((ll)n*(n+1)/2);
		w[0]=w[n];
		F(i,1,n)if((w[i]-w[i-1]-num)%n||(w[i]-w[i-1]-num)>0){printf("NO\n");return 0;}
		printf("YES\n");return 0;
	}
	return 0;
}
//w(i)-w(i-1)=x*1+y(1-n)=x+y-yn=sum-yn,yn=w[i-1]-w[i]+sum 
//x+y=sum