#include <bits/stdc++.h>
using namespace std;
int num;
int huntun[11];
int r(int a, int b) {
  if (a >= b)
    return a - b;
  else
    return b - a;
}
int main() {
  cin >> num;
  for (int i = 1; i <= num; i++) {
    cin >> huntun[i];
  }
  for (int i = 2; i <= num; i++) {
    if (r(huntun[i], huntun[i - 1]) >= 2) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
