#include <bits/stdc++.h>
using namespace std;
unsigned long long a[100005];
unsigned long long eu(unsigned long long a, unsigned long long b) {
  if (b == 0) return a;
  return eu(b, a % b);
}
int main() {
  unsigned long long n;
  cin >> n;
  deque<unsigned long long> dq;
  for (int i = 0; i < n; i++) cin >> a[i];
  do {
    dq.push_back(a[0]);
    for (int i = 1; i < n; i++) {
      unsigned long long check = dq[i - 1] / eu(dq[i - 1], a[i]) * a[i];
      if (check % 4 == 0)
        dq.push_back(check);
      else {
        dq.clear();
        break;
      }
      if (i == n - 1) {
        cout << "Yes";
        return 0;
      }
    }
  } while (next_permutation(a, a + n));
  cout << "No";
}
