[0=>1]]; for($i = 3;$i;$i--) { for($j = count($pos); $j ;$j--) { foreach($pos as $x => $ys) { foreach($ys as $y => $flg) { foreach($directions as $dir) { $pos[$x+$dir[0]][$y+$dir[1]] = 1; } } } } } list($qx , $qy) = explode(" ", trim(fgets(STDIN))); if(isset($pos[$qx][$qy])) { echo "YES"; } else { echo "NO"; } echo PHP_EOL;