#include <bits/stdc++.h>
using namespace std;
int main() {
  long int a[100];
  int n, flag = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n - 1; i++) {
    if ((a[i] * a[i + 1]) % 4 != 0) {
      int swap;
      swap = a[i + 1];
      a[i + 1] = a[i + 2];
      a[i + 2] = swap;
      i--;
    } else {
      flag++;
    }
  }
  if (flag == n - 1) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  return 0;
}
