#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main() { int n; cin >> n; vector a(n); for(int i = 0; i < n; i++) { cin >> a[i]; } int tmp = 0; bool ok = true; for(int i = n - 1; i >= 0; i--) { if((a[i] + tmp) % (i + 1) != 0) { ok = false; } if(a[i] > 0) { tmp += (a[i] + tmp) / (i + 1); } } ok ? (cout << "Yes\n") : (cout << "No\n"); return 0; }