#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
int n;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  vector<long long> A(n);
  for (int i = 0; i < n; i++) cin >> A[i];
  bool flag = false;
  do {
    bool f2 = false;
    for (int i = 0; i < n - 1; i++) {
      if ((A[i] * A[i + 1]) % 4 == 0) {
        f2 = true;
      } else {
        f2 = false;
        break;
      }
    }
    if (f2) {
      flag = true;
      break;
    }
  } while (next_permutation(A.begin(), A.end()));
  if (flag)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
