#include <bits/stdc++.h>
using namespace std;
signed main() {
  cin.tie(0); ios::sync_with_stdio(false);
  int n; cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  long long sum = accumulate(a, a + n, 0LL);
  if (sum % ((n + 1LL) * n / 2) != 0) {
    cout << "NO" << "\n";
    return 0;
  }
  int m = sum / ((n + 1LL) * n / 2), t = 0;
  for (int i = 0; i < n; i++) {
    int d = a[(i + 1) % n] - a[i % n];
    if ((m - d) % n != 0 or d > m) {
      cout << "NO" << "\n";
      return 0;
    }
    t += (m - d) / n;
  }
  cout << (t == m ? "YES" : "NO") << "\n";
  return 0;
}