#include<cstdio>
using namespace std;

long long a[100005];
long long b[100005];
int n;

int judge( )
{
	for(int i=0; i<n; i++)
	{
		if(b[i]!=0)
			return i;
	}
	return n-1;
}

void copy( )
{
	for(int i=0; i<n; i++)
		b[i]=a[i];
}

int main()
{
	scanf("%d",&n);
	for(int i=0; i<n; i++)
		scanf("%lld",&a[i]);
	bool flag=false;
	/*Select one box. Let the box be the i-th box.
	Then, for each j from 1 through N,
	remove exactly j stones from the (i+j)-th box.
	Here, the (N+k)-th box is identified with the k-th box.*/
	for(int i=0; i<n; i++)
	{
		copy( );
		flag=true;
		for(int j=1; j<=n; j++)
		{
			if(b[(i+j)%n]>=j)
				b[(i+j)%n]-=j;
			else
			{
				flag=false;
				break;
			}
		}
		/*if(flag==false)
			continue;*/
		if(flag!=false)
		{
			if(judge()==n-1)
			{
				flag=true;
				break;
			}
		}
		/*for(int i=0; i<n; i++)
		{
			printf("%d ",b[i]);
		}
		printf("\n");*/
	}

	if(flag)
		printf("YES\n");
	else
		printf("NO\n");
}