а вот решение:
var a, b, e, i, j, k:longint;
chisla: array[1..80000] of longint;
begin
assign(input, 'input.txt'); reset(input);
assign(output, 'output.txt'); rewrite(output);
readln(a,b);
e:=1;
for j:=a to b do
begin
k:=0;
for i:=1 to j do
if (j mod i)=0 then k:=k+1;
if (k=2) then
begin
chisla[e]:=j;
e:=e+1;
end;
end;
if chisla[1]<>0 then
for i:=1 to e-1 do
write(chisla,' ')
else writeln('Absent');
end.