#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int a[100005];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  bool flag = true;
  for (int i = 0; i < n - 1; i++) {
    if ((a[i] * a[i + 1]) % 4 != 0) {
      flag = false;
      break;
    }
  }
  if (flag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
