#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  vector<int> v;
  int can_divide = 0;
  int cannot_divide = 0;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int tmp;
    cin >> tmp;
    v.push_back(tmp);
  }
  for (int j = 0; j < n - 1; ++j) {
    if ((v[j] * v[j + 1]) % 4 == 0)
      can_divide++;
    else
      cannot_divide++;
  }
  if (can_divide >= cannot_divide) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
