#include <bits/stdc++.h>
using namespace std;
struct Edge {
  int from, to, cost;
  bool operator<(Edge e) { return cost < e.cost; }
};
template <class T>
using vec = vector<T>;
template <class T>
using pql = priority_queue<T, vector<T>, greater<T>>;
string debug_show(pair<int, int> a) {
  return "(" + to_string(a.first) + "," + to_string(a.second) + ")";
}
template <class T>
struct augEdge {
  T from, to;
  int cost;
  bool operator<(augEdge e) { return cost < e.cost; }
  bool operator>(augEdge e) { return cost > e.cost; }
};
template <class T>
using augGraph = vector<augEdge<T>>;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  int t;
  int ans = n;
  bool f = false;
  for (int i = (int)(0); i < (int)(n); i++) {
    cin >> t;
    if (t % 4 == 0) {
      ans -= 3;
    } else if (t % 2 == 0) {
      if (f == true) {
        f = false;
        ans -= 2;
      } else {
        f = true;
      }
    }
  }
  if (ans <= 0) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
