#include <bits/stdc++.h>
using namespace std;
int n, s, ans;
int a[100005];
int check(int n) {
  int cnt = 0;
  while (n % 2 == 0) {
    cnt++;
    n /= 2;
  }
  return cnt;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s;
    a[i] = check(s);
  }
  sort(a, a + n);
  for (int i = 0; 2 * i + 1 < n; i++) {
    int temp = a[n - 1 - i];
    for (int j = n - i - 2; j > 2 * i + 1; j--) a[n - 1 - i] = a[j];
    a[2 * i + 1] = temp;
  }
  for (int i = 0; i < n - 1; i++) {
    if (a[i] + a[i + 1] >= 2) ans++;
  }
  cout << (ans == n - 1 ? "Yes" : "No") << endl;
}
