uses crt;
var n,i,kt,j:longint;
begin
clrscr;
repeat
write('n='); readln(n);
if n<=2 then writeln('vui long nhap lai');
until n>2;
writeln('cac so nguyen to nho hon so ',n,' la: ');
for i:=2 to n do
begin
kt:=0;
for j:=2 to i-1 do
if i mod j=0 then kt:=1;
if kt=0 then write(i:4);
end;
readln;
end.
program cachkhac;
var i,N: integer;
function KT(a: integer): boolean;
var j: integer;
begin
nt:=false;
if j<=1 then exit;
for j:=2 to trunc(sqrt(a)) do if a mod j=0 then exit;
nt:=true;
end;
Begin
Write('Nhap so nguyen N=');
Readln(N);
For i:=1 to n do
If nt(i) then write(i,' ');
Readln
end.