#include <cstdio>
int main(){
    int n;
    int i;
    scanf("%d",&n);
    long long s,s1;
    s=0;s1=0;
    int a[n+5];
    s1=n*(n+1)/2;
    for (i=1;i<=n;i++){
        scanf("%d",&a[i]);
        s=(s+a[i])% s1;
    }

    if (s % s1 != 0){
        printf("NO");
    }
    else{
        printf("YES");
    }
    return 0;
}
