#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, sum = 0, a[100005], m;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    if (a[i] == 0)
      continue;
    else
      m = a[i];
    a[i] = 0;
    int f = 0;
    int j = 0;
    for (; j < n; j++) {
      if (a[j] == 0) continue;
      if ((m * a[j]) % 4 == 0) {
        m = a[j];
        a[j] = 0;
        f = 1;
        j = 0;
      }
    }
    if (f == 0) sum++;
    if (sum > 0) break;
  }
  if (sum > 0)
    cout << "No";
  else
    cout << "Yes";
}
