#include <bits/stdc++.h>
using namespace std;
int a[100001];
int main() {
  int n, m, i, j = 1, k = 0;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    j *= a[i];
  }
  while (j % 4 == 0) {
    j /= 4;
    k++;
  }
  if (k + 2 >= n)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
