#include <bits/stdc++.h>
typedef unsigned long long int ull;
using namespace std;
int main()
{
    int a,b,c=0,d=0;
    cin>>a;
    int ar[a]=;
    for(int i=0;i<a;i++)
    {
        cin>>ar[i];
        if(ar[i]%4==0)
        {
            c++;
        }
        if(ar[i]%4!=0)
        {
            d++;
        }
    }
    if(d%c==0&&d/2==c)
    {
        cout<<"YES";
    }
    else
    {
        cout<<"NO";
    }
}
