#include <bits/stdc++.h>
using namespace std;
using ll = long long;
bool Solve() {
  int n, a;
  cin >> n;
  int cnt[3] = {0, 0, 0};
  for (int i = 0; i < n; ++i) {
    cin >> a;
    int p = 0;
    while (a % 2 == 0) {
      ++p;
      a /= 2;
    }
    if (p == 0)
      ++cnt[0];
    else if (p == 1)
      ++cnt[1];
    else
      ++cnt[2];
    cout << p << endl;
  }
  if (cnt[0] <= cnt[2])
    return true;
  else
    return false;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  if (Solve())
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
