#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  int count = 0, two = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 2) {
      two++;
    }
    if (two % 2 == 0 && two > 0) {
      count++;
      two = 0;
    }
    if (a[i] % 4 == 0) count++;
  }
  if (count >= n / 2)
    cout << "Yes";
  else
    cout << "No";
}
