#include <bits/stdc++.h>
long long inf = (long long)1E17;
long mod(long a) {
  long long c = a % (long long)(1E9 + 7);
  if (c >= 0) return c;
  return c + (long long)(1E9 + 7);
}
using namespace std;
long long gcd(long long a, long long b) {
  if (a < b) {
    swap(a, b);
  }
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
long long lcm(long long x, long long y) { return (x / gcd(x, y)) * y; }
int main() {
  int n;
  cin >> n;
  long long a;
  int ind = 0;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a % 2 == 1) {
      ind--;
    } else if (i % 4 == 0) {
      ind++;
    } else {
      continue;
    }
  }
  if (ind >= 0) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
