#include using namespace std; int main(){ int n; cin >> n; int a[n + 1]; for (int i = 1; i <= n; ++i) cin >> a[i]; int times = 0; for (int i = n; i >= 1; --i){ if (a[i] <= i && (a[i] + times)%i==0){ if (a[i] > 0) ++times; }else{ cout << "No" << endl; return 0; } } cout << "Yes" << endl; }