#include <iostream>
#include <cstdio>
#define N 100005
using namespace std;

typedef long long ll;
ll n, s, c, a[N], b[N];
int main()
{
	ll i;
	cin >> n;
	for (i = 1; i <= n; i++) scanf("%lld", &a[i]), s += a[i], b[i] = a[i] - a[i - 1];
	b[1] = a[1] - a[n];
	if (s % (n * (n + 1) / 2)) {cout << "NO"; return 0;}
	s /= n * (n + 1) / 2;
	for (i = 1; i <= n; i++) {
		if (s < b[i] || (s - b[i]) % n) {cout << "NO"; return 0;}
//		c += (s - b[i]) / n;
	}
//	if (c != s) {cout << "NO"; return 0;}
    cout << "YES" << endl;
    return 0;
}