#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = (int)1e7;
using p = pair<int, int>;
using v = vector<ll>;
auto used = v(50, 0);
int n, m;
int main() {
  int n;
  cin >> n;
  auto a = v(n, 0);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  ll ans = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] % 4 == 0 && a[i + 1] % 4 == 0 && a[i] % (a[i + 1] / 4) == 0) ans++;
  }
  if (ans = a.size() - 1) {
    cout << "Yes";
  } else {
    cout << "No";
  }
}
