#include<cstdio>
#include<cstring>
#include<algorithm>
#define ll long long
#define MN 100005
using namespace std;
inline ll in(){
    ll x=0;bool f=0;char c;
    for (;(c=getchar())<'0'||c>'9';f=c=='-');
    for (x=c-'0';(c=getchar())>='0'&&c<='9';x=(x<<3)+(x<<1)+c-'0');
    return f?-x:x;
}
ll a[MN],b[MN];
ll tot,sum,num,n,d,cnt;
int main()
{
	n=in();tot=(1ll*(n+1)*n)>>1;
	for (int i=1;i<=n;++i) a[i]=in(),sum+=1ll*a[i];a[0]=a[n];
	if (sum%tot) {printf("NO");return 0;}num=sum/tot;
	for (int i=0;i<=num;++i) b[i]=1ll*(i-(n-1)*(num-i));
	for (int i=1;i<=n;++i){
		d=a[i]-a[i-1];
		int pos=lower_bound(b,b+num,d)-b;
		if (d!=b[pos]) {printf("NO");return 0;}
		cnt+=1ll*num-pos;
	}printf((cnt==num)?"YES":"NO");return 0;
}