#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  int stack2 = 0;
  int tmp = 0;
  int tmp_index = 0;
  for (int i = 0; i < n; i++) {
    cin >> tmp;
    if (tmp == 2) {
      if (stack2 == 0) {
        tmp_index = i;
        stack2 += 1;
      } else {
        a[tmp_index] = 4;
        n -= 1;
        i -= 1;
        stack2 = 0;
      }
    } else {
      a[i] = tmp;
    }
    if (stack2 == 1 && i == (n - 1)) {
      a[i] = 2;
    }
  }
  int mod4 = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] % 4 == 0) {
      mod4 += 1;
    }
  }
  if (mod4 >= int(n / 2)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
