#include <bits/stdc++.h>
using namespace std;
#define LL long long
int const SIZE=100009;

int main(){
	LL n;
	cin>>n;
	LL arr[SIZE];
	LL sum=0;
	for(int i=0;i<n;i++){
		cin>>arr[i];
		sum+=arr[i];
	}
	LL r=(2*sum)/(n*((n+1)));
	if((((2*sum)%(n*((n+1))))!=0)||(r<=0)){
		cout<<"NO";
		return 0;
	}
	for(int i=0;i<n;i++){
		int tn=(r-(arr[(i+1)%n]-arr[i%n]));
		if((tn%n!=0)||(tn<0)){
			cout<<"NO";
			return 0;
		}
	}
	cout<<"YES";
	return 0;
}