#include<iostream>
#include<algorithm>
#define LL long long
int N;
int A[100010];
LL sum;

int main() {
	std::cin >> N;
	for (int i = 1; i <= N; i++) {
		std::cin >> A[i];
		sum += A[i];
		if (i == 0)A[0] = A[N];
	}
	LL D = (((LL)N + 1)*(LL)N) / 2;
	if (sum%D) {
		std::cout << "NO" << std::endl;
		return 0;
	}
	int ave = sum / D;
	for (int i = 1; i < N; i++) {
		int tmp = A[i] - A[i + 1] + ave;
		if (tmp < 0 || tmp % N) {
			std::cout << "NO" << std::endl;
			return 0;
		}
	}
	std::cout << "YES" << std::endl;
	return 0;
}
