#include <cstdio>
typedef long long LL;
const int N = 1e5 + 5;
LL a[N];
int n;
LL sum, c, cc;
bool solve(){
	c = 1ll*n*(n+1)>>1;
	if(sum % c) return false;
	c = sum / c;
	for(int i = 1; i < n; i ++){
		if(c < a[i] - a[i-1]) return false;
		if((c - a[i] + a[i-1]) % n) return false;
		cc += (c - a[i] + a[i-1]) / n;
	}
	if((c - a[0] + a[n-1]) % n) return false;
	cc += (c - a[0] + a[n-1]) / n;
	if(c == cc) return true;
	return false;
}
int main(){
	scanf("%d", &n);
	for(int i = 0; i < n; i ++){
		scanf("%lld", &a[i]);
		sum += a[i];
	}
	puts(solve()?"YES":"NO");
}