<>;while(<>){@m=(-1e9)x600;$z=0;map{$j=0;for$x(<>=~/\S+/g){$z|=$x>-$_,$_<$x?$_=$x:0for@m[$_,-++$j,200+$_-$j,299+$_+$j]}}1..$_;print'in'x$z,finite,$/}