Var simple: array[1..10000] of integer; i, j, a, b, simple_n, s: integer; is_simple: boolean;
begin read(a, b);
for i := 2 to b do begin is_simple := true; for j := 1 to simple_n do is_simple := is_simple and (i mod simple[j] <> 0); if is_simple then begin simple_n := simple_n + 1; simple[simple_n] := i; writeln(i); if i >= a then s := s + i; end; end;
simple: array[1..10000] of integer;
i, j, a, b, simple_n, s: integer;
is_simple: boolean;
begin
read(a, b);
for i := 2 to b do begin
is_simple := true;
for j := 1 to simple_n do
is_simple := is_simple and (i mod simple[j] <> 0);
if is_simple then begin
simple_n := simple_n + 1;
simple[simple_n] := i;
writeln(i);
if i >= a then s := s + i;
end;
end;
writeln(s);
end.