#include <bits/stdc++.h>
using namespace std;

int main(){
  int n;
  cin >> n;

  for(int i = 0; i < n; i++){
    cin >> a[i];
    if((a[i]*a[i-1]) % 4 != 0){
      cout << "No" << endl;
      break; 
  }
  cout << "Yes" << endl;
  return 0;
}