program cogs1261;
var
cnt,i,n,m:longint;
procedure init;
begin
assign(input,'tinkle.in');reset(input);
assign(output,'tinkle.out');rewrite(output);
end;
function prime(x:longint):boolean;
var
i:longint;
begin
if (x=2)or(x=3) then
exit(true);
for i:=2 to trunc(sqrt(x)) do
if x mod i=0 then exit(false);
exit(true);
end;
procedure main;
begin
readln(n,m);
cnt:=1;
for i:=2 to 15487469 do
begin
if cnt>n+m then break;
if prime(i) then
begin
if(cnt<>n)and(cnt>=n-m)and(cnt<=n+m) then
begin
write(i,' ');
end;
inc(cnt);
end;
end;
end;
begin
init;
main;
close(output);
end.//complete by chouyi20140914