#include #include using namespace std; using namespace atcoder; using ll=long long; using ld=long double; ld pie=3.14159265359; ll inf=80010010; ll mod=1000000007; int main(){ ll n; cin >> n; vectora(n+1); for (ll i = 1; i <= n; i++) { cin >> a[i]; } ll now=0; bool ok=true; for (ll i = n; i >=1; i--) { if (a[i]>i) { ok=false; break; } if ((a[i]+now)%i!=0) { ok=false; break; }else{ now+=(a[i]+now)/i; } } if (ok) { cout << "Yes" << endl; }else{ cout << "No" << endl; } }