var a, b, i, j, l: integer;
begin
read(a, b);
for i:=a to b do
j:=2;
l:=round(sqrt(i));
while (i mod j <> 0) and (j <= l) do
inc(j);
if j > l then write(i, ' ');
end;
end.
var a, b, i, j, l: integer;
begin
read(a, b);
for i:=a to b do
begin
j:=2;
l:=round(sqrt(i));
while (i mod j <> 0) and (j <= l) do
inc(j);
if j > l then write(i, ' ');
end;
end.