($h,$w)=<>=~/\d+/g; $/=\1; for$y(0..$h-1){ for$x(0..$w-1){ $a[$x|$y<<8]=<>; } <>; } for$v(0..$h-1){ for$u(0..$w-1){ if($v+$u){ hoge1:{ @b=@a; for$y(0..$h-1){ for$x(0..$w-1){ if($b[$x|$y<<8] eq '#'){ if($b[$x+$u|$y+$v<<8] eq '#'){ $b[$x+$u|$y+$v<<8]=0; }else{ last hoge1; } } } } print 'YES'; exit; } } } } print 'NO';