#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <algorithm>
using namespace std;
#define inf (0x3f3f3f3f)
#define ls int len=s.size()
#define ls1 int len1=s1.size()
#define eps 1e-6
typedef long long int LL;
typedef long long int ll;

#include <iostream>
#include <sstream>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <string>
#include<stack>

const int M = 1e5+100;
long long a[M],b[M],c[M],ans,t,s;
int n;
bool init(){
    scanf("%d",&n);
    s=0;
    for(int i=0;i<n;i++){scanf("%lld",&a[i]);s+=a[i];}
    for(int i=1;i<n;i++) b[i-1]=a[i]-a[i-1];
    b[n-1]=a[0]-a[n-1];
    t=n*(n+1)/2;
    if(s%t) return 0;
    s=s/t;ans=0;
    for(int i=0;i<n;i++){
        if(s-b[i]<0||(s-b[i])%n) return 0;
        ans+=(s-b[i])/n;
    }
    if(ans==s) return 1;
    else return 0;
}

int main(){
#ifdef LOCAL
	freopen("data.h", "r", stdin);
	freopen("1.h","w",stdout);
#endif
    if(init()) puts("YES");
    else puts("NO");
}
