<?php
function pat($a, $s = '')
{
  $r = array();
  if (count($a) && is_array($a)) {
    foreach ($a as $k => $v) {
      $_s = $s . $v;
      $_a = $a;
      unset($_a[$k]);
      $_r = pat($_a, $_s);
      $r = array_merge($r, $_r);
    }
  } else {
    $r[] = $s;
  }
  return $r;
}

$tmp = trim(fgets(STDIN));
$a = explode(' ', trim(fgets(STDIN)));
$pats = pat($a);
foreach ($pats as $key => $pat) {
  $ans[$key] = true;
  $nums = str_split($pat);
  $_cnt = count($nums);
  for ($i=0; $i < $_cnt-1; $i++) {
    $end = intval(substr($nums[$i] * $nums[$i+1], -2));
    if ($end % 4 !== 0 && $end !== 0) {
      $ans[$key] = false;
      break;
    }
  }
}

if (in_array(true, $ans)) {
  echo "Yes\n";
} else {
  echo "No\n";
}
