#include <bits/stdc++.h>
using namespace std;
void YN(bool flg) {
  if (flg)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
void Yn(bool flg) {
  if (flg)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
void yn(bool flg) {
  if (flg)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
}
map<long long, long long> prime_factorize(long long n) {
  map<long long, long long> res;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i != 0) continue;
    long long ex = 0;
    while (n % i == 0) {
      ex++;
      n /= i;
    }
    res[i] = ex;
  }
  if (n != 1) res[n] = 1;
  return res;
}
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  int cnt = 0;
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i];
    if (a[i] == 2) cnt++;
  }
  int t = 0;
  for (int i = 0; i < (int)(n); i++) {
    map<long long, long long> res = prime_factorize(a[i]);
    if (res[2] >= 2) t++;
  }
  if (cnt >= 1)
    Yn(t >= (n - cnt + 1) / 2);
  else
    Yn(t >= n / 2);
  return 0;
}
