#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int *a = new int[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long sum = 1;
  for (int i = 0; i < n; i++) {
    sum *= a[i];
  }
  int i = 0;
  for (; i < n; i++) {
    if (sum / 4 == 0)
      sum = sum / a[i];
    else
      break;
  }
  if (i == n - 1) {
    cout << "Yes";
  } else
    cout << "No";
  return 0;
}
