#include <iostream>
#include <math.h>
using namespace std;
 
int main(){
int N;
cin >>N;
int a[N],b[N]={0};
int c[2]={0};

for(int i=0;i<5;i++){
cin>>a[i];

for(int k=0;k<10;k++){
if(a[i]%2==0){
a[i]=a[i]/2;
b[i]+=1;}
}


for (int j=0;j<3;j++){
if (b[i]==j ||(j==2&&b[i]>2)){
c[j]++;}
}

}


if (c[0]<=c[2]+1){
if ((c[1]==0)||(c[0]<c[2]+1)||c[0]==0){
cout<<"Yes";}
else{ cout <<"No";}}
else{cout<<"No";}


}