#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
using ll = long long;
using P = pair<int, int>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int d(ll a) {
  ll j;
  for (int i = 0; i < (27); i++) {
    j = 27 - i;
    if (a % (1 << j) == 0) {
      return j;
    }
  }
  return 0;
}
int main() {
  int n;
  cin >> n;
  vector<ll> a(n);
  ll tot = 0;
  for (int i = 0; i < (n); i++) {
    ll x;
    cin >> x;
    a[i] = d(x);
    tot += a[i];
  }
  sort((a).begin(), (a).end());
  int c = n - 1;
  for (int i = 0; i < (n); i++) {
    if ((a[i] + a[i + 1]) >= 2) {
      continue;
    } else {
      if (i + 1 >= n / 2) continue;
      swap(a[i + 1], a[c--]);
      if ((a[i] + a[i + 1]) < 2) {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  cout << "Yes" << endl;
  return 0;
}
