#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1001001001;
const int MOD = 1000000007;
template <typename T>
void print(const T& v);
int main() {
  int N;
  cin >> N;
  int zero = 0, one = 0;
  for (int i = 0; i < (int)(N); i++) {
    int tmp;
    cin >> tmp;
    if (tmp % 2 == 0)
      zero++;
    else
      one++;
  }
  vector<int> c(N);
  if (zero >= 2) {
    c[0] = c[1] = 0;
    zero -= 2;
  } else {
    c[0] = c[1] = 1;
    one -= 2;
  }
  for (int i = 2; i < N; i++) {
    if (c[i - 1] == 0) {
      if (c[i - 2] == 0) {
        c[i] = 0;
        zero--;
      } else if (c[i - 2] == 1) {
        c[i] = 1;
        one--;
      }
    } else if (c[i - 1] == 1) {
      if (c[i - 2] == 0) {
        c[i] = 1;
        one--;
      } else if (c[i - 2] == 1) {
        c[i] = 0;
        zero--;
      }
    }
    if (zero < 0 || one < 0) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}
template <typename T>
void print(T const& v) {
  for (int i = 0; i < v.size(); i++) {
    if (i) cout << " ";
    cout << v[i];
  }
  cout << endl;
}
