#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
const int maxn=1e5+10;
int n,a[maxn];
bool check()
{
	LL s=0;
	for (int i=1;i<=n;i++) s+=a[i];
	s*=2;
	if (s%((LL)n*(n+1))!=0) return 0;
	s/=n;s/=(n+1);
	for (int i=1;i<n;i++)
	{
		LL s1=a[i]-a[i+1]+s;
		if (s1<0||s1%n!=0) return 0;
	}
	LL s1=a[n]-a[1]+s;
	if (s1<0||s1%n!=0) return 0;
	return 1;
}
int main()
{
	cin>>n;
	for (int i=1;i<=n;i++) scanf("%I64d",&a[i]);
	if (check()) printf("YES");
	else printf("NO");
	return 0;
}