<?php
fscanf(STDIN, "%d", $n);
$a = explode(' ', trim(fgets(STDIN)));
$x = $y = $z = 0;
foreach ($a as $b) {
	if ($b % 2) {
		$x++;
	} elseif ($b % 4) {
		$y++;
	} else {
		$z++;
	}
}
echo $z < $x - 1 || $z == $x - 1 && $y > 0 ? 'NO' : 'YES';