#include using namespace std; using ll = long long; constexpr char newl = '\n'; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin >> n; vector a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } ll cnt = 0; for (int i = n - 1; i >= 0; i--) { if ((cnt + a[i]) % (i + 1) != 0) { cout << "No\n"; return 0; } cnt += (cnt + a[i]) / (i + 1); } cout << "Yes\n"; return 0; }