#include using namespace std; #define int long long typedef pair P; int INF = 1e18; int mod = 1e9+7; int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; signed main() { int N; cin >> N; vectorA(N+1); for(int i = 1; i <= N; i++) { cin >> A[i]; } int sum = 0; for(int i = N; i >= 1; i--) { if(A[i]+sum == 0) { continue; } else if((A[i]+sum)%i == 0) { sum += (A[i]+sum)/i; } else { cout << "No" << endl; return 0; } } cout << "Yes" << endl; }