#include<set>
#include<cmath>
#include<algorithm>
using namespace std;

#define MAXNUM3B 1000000
int main()
{
	int lines = 0;

	scanf("%d",&lines);
	vector<int> allnums;
	for (int i = 0; i < lines; ++i)
	{
		int num = 0;
		scanf("%d", &num);
		allnums.push_back(num);
	}

	int test4ok[MAXNUM3B] = { 0 };
	int testeachnum[MAXNUM3B] = { 0 };
	bool bluck = true;
	for (int i = 0; i < lines-1; ++i)
	{
		//int muti=allnums[i] * allnums[i - 1];
		for (int j = i+1; j < lines; ++j)
		{
			if (testeachnum[j] > 1)//相邻数最多用2次
				continue;
			int muti = allnums[i] * allnums[j];
			if (muti % 4 == 0)
			{
				//can /4 test next i
				test4ok[i] = 1;
				testeachnum[j]++;
				break;
			}
			
		}
	}

	for (int i = 0; i < lines - 1; ++i)
	{
		if (test4ok[i] == 0)
			bluck = false;
	}


	if (bluck)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
	system("pause");
}
