// Slower C++ solution:
#include <iostream>

//#include <sstream>

#include <string>

#include <algorithm>

#include <cstdio>

#include <cstring>

#include <map>

#include <set>

#include <queue>

#include <vector>

#include <cmath>

//#include <functional>

//#define LL long long



using namespace std;





const int maxn = 100005;

long long a[maxn];

long long b[maxn];



int main()

{

//    printf("ok");

#ifdef LOCAL

//    freopen("/Users/ecooodt/Desktop/c++ and acm/DI2_lesson/2/2.txt","r",stdin);

#endif

//    printf("%d",-5%5)

    memset(a,0,sizeof(a));

    long long n,m;

    scanf("%lld",&n);

    long long sum = 0;

    for(int i = 0; i < n; i++)

    {

        scanf("%lld",&a[i]);

        sum += a[i];

    }

    long long t = n*(1+n)/2;

    if(sum % t != 0)

    {

        printf("NO\n");

        return 0;

    }

    sum /= t;



    for(int i = 1; i < n; i++)

    {

        b[i-1] = a[i-1] - a[i];

    }

    b[n-1] = a[n-1] - a[0];





    for(int i = 0 ; i < n ; i++)

    {

        b[i] += sum;

        if(b[i] == 0)

        {

            continue;

        }

//        printf("%d\n",b[i]);

        if(b[i] % n != 0 || b[i] < 0)

        {

            printf("NO\n");

            return 0;

        }

    }

    printf("YES\n");

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.7338504758782844x):
//Optional FAST



//#pragma GCC optimize("Ofast")

//#pragma GCC optimize("unroll-loops")

//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,fma,abm,mmx,avx,avx2,tune=native")



//Required Libraries



#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>

#include <ext/pb_ds/tree_policy.hpp>

#include <ext/pb_ds/detail/standard_policies.hpp>



//Required namespaces



using namespace std;

using namespace __gnu_pbds;



//Required defines



#define endl '\n'



#define READ(X) cin>>X;

#define READV(X) long long X; cin>>X;

#define READAR(A,N) long long A[N]; for(long long i=0;i<N;i++) {cin>>A[i];}

#define rz(A,N) A.resize(N);

#define sz(X) (long long)(X.size())

#define pb push_back

#define pf push_front

#define fi first

#define se second

#define FORI(a,b,c) for(long long a=b;a<c;a++)

#define FORD(a,b,c) for(long long a=b;a>c;a--)



//Required typedefs



typedef tree<long long,null_type,less<long long>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;

typedef tree<long long,null_type,greater<long long>,rb_tree_tag,tree_order_statistics_node_update> ordered_set1;

typedef long long ll;

typedef long double ld;

typedef pair<int,int> pii;

typedef pair<long long,long long> pll;



//Required Constants



const long long inf=(long long)1e18;

const long long MOD=(long long)(1e9+7);

const long long INIT=(long long)(1e6+1);

const long double PI=3.14159265358979;



// Required random number generators



// mt19937 gen_rand_int(chrono::steady_clock::now().time_since_epoch().count());

// mt19937_64 gen_rand_ll(chrono::steady_clock::now().time_since_epoch().count());



//Required Functions



ll power(ll x,ll y) 

{ 

    if (y == 0) 

        return 1; 

    ll p = power(x, y/2) % MOD; 

    p = (p * p) % MOD; 

  

    return (y%2 == 0)? p : (x * p) % MOD; 

}

ll modInverse(ll a) 

{ 

   return power(a,MOD-2); 

   

}



//Work



int main()

{

    #ifndef ONLINE_JUDGE

    if (fopen("INPUT.txt", "r"))

    {

        freopen ("INPUT.txt" , "r" , stdin);

        //freopen ("OUTPUT.txt" , "w" , stdout);

    }

    #endif

    ios::sync_with_stdio(false);

    cin.tie(0);

    cout.tie(0);



    clock_t clk;

    clk = clock();

//-----------------------------------------------------------------------------------------------------------//



    READV(N);

    READAR(A,N);

    ll sum=0;

    FORI(i,0,N)

    {

        sum+=A[i];

    }

    ll cnt=(N*(N+1))/2;

    if(sum%cnt==0)

    {

        ll K=sum/cnt;

        bool ok=true;

        ll tot=0;

        FORI(i,0,N)

        {

            ll d=A[(i+1)%N]-A[i];

            if(K<d || (abs(K-d))%N!=0)

            {

                ok=false;

                break;

            }

            else

            {

                tot+=(K-d)/N;

            }

        }

        if(ok && tot==K)

        {

            cout<<"YES"<<endl;

        }

        else

        {

            cout<<"NO"<<endl;

        }

    }

    else

    {

        cout<<"NO"<<endl;

    }

    



//-----------------------------------------------------------------------------------------------------------//





    clk = clock() - clk;

    cerr << fixed << setprecision(6) << "Time: " << ((double)clk)/CLOCKS_PER_SEC << endl;



    return 0;

}