($N,$K)=glob<>; for(2..$N){ if(!$_[$_]){ for($i=0;$i<=$N;$i+=$_){ ++$_[$i] } } } print~-grep$_>=$K,@_