function czypierwsza(a:cardinal): boolean;
var l1, p1:cardinal;
begin
  l1 := 0;
  for p1 := 1 to a do
    if a mod p1 = 0 then
      l1 := l1 + 1;
  czypierwsza:= l1 = 2
end;
 
function czypol(n:cardinal):boolean;
var i:cardinal;
begin
  for i:=2 to n div 2 do
    if n mod i = 0 then begin
      czypol:=czypierwsza(n div i);
      exit
    end;
  czypol:= false
end;

var i:integer;
begin
  for i:=1 to 1000 do 
    if czypol(i) then write( i, ', ');
    writeln;
    writeln('4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 35, 38, 39, 46, 49, 51, ',
    '55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, ',
    '118, 119, 121, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, ',
    '161, 166, 169, 177, 178, 183, 185, 187');
end. 