#include <iostream>
#include <stdio.h>
#define N 100005
using namespace std;
#define ll long long
 
ll a[N],b[N];
int main(){
	ll n,Max=0,flag=1,ans=0;
	scanf("%lld",&n);
	ll num=n;
	num=(n+1)*num/2;
	for(int i=0;i<=n;i++){
		if(i<n) scanf("%lld",&a[i]);
		if(i){
			b[i%n]=a[i%n]-a[i-1];
			Max=max(Max,b[i%n]);
		}
	}
	for(int i=0;i<n;i++){
		b[i]=Max-b[i];
		if(b[i]%n) flag=0;
		b[i]/=n;
		ans+=b[i]*(n-i);
	}
	if(flag && (a[n-1]-ans)%num==0 && ans<=a[n-1]){
		cout<<"YES"<<endl;
	}else{
		cout<<"NO"<<endl;
	}
 
}