#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(200005);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  for (int i = 0; i < n; i++) {
    v[i] %= 2;
    if (v[i] == 1) {
      if (v[i + 1] <= 0) {
        cout << "No\n";
        return 0;
      } else {
        v[i + 1]--;
      }
    }
  }
  cout << "Yes\n";
  return 0;
}
