#include<cstdio>
typedef long long int ll;
int main(){
	ll n,a[100000],b[100000];
	ll total = 0;
	bool flag = true;
	scanf("%lld",&n);
	for(int i=0;i<n;i++){
		scanf("%lld",a+i);
		total += a[i];
	}
	if(total%(n*(n+1)/2)==0) total /= n*(n+1)/2;
	else flag = false;
	for(int i=0;i<n;i++) if(a[(i+1)%n] - a[i] - total > 0) flag = false;
	for(int i=0;i<n;i++) if((a[(i+1)%n] - a[i] - total)%n!=0) flag = false;
	if(flag) printf("YES\n");
	else printf("NO\n");
}
