{$U-}
module num ;


use
  math,iostd,system,fpc,putnum;

const
  MAXNUM = 12000,
  ST     = 24000,
  tab  = 2000;

var
  cnt<0>;

sub . [2] var tabs*,ind*;
  tabs + pred(ind) << 1
ret


sub chek var i*,j,why;
@j=1;
fldword(@i);
fsqrt;
fstword(@why);
while j < why do
  if i % word(tab.j) then
  else
    FALSE;
    exit
  fi
  inc(@j)
wend;
TRUE
ret



sub main var i;
finit;
@i=2;
repeat
if chek(i) then
  putword(i);
  inc(@cnt);
  (tab.cnt) = i;
  cr;
fi
inc(@i);
until i > MAXNUM loop
ret

end
