program kiem_tra_nguyen_to;
uses crt;
var n,i:integer; bl:boolean;
begin
clrscr;
bl:=true;
write('nhap vao so can kiem tra tinh nguyen to: '); readln(n);
if n<=1 then bl:=false;
for i:=2 to trunc(sqrt(n)) then
if n mod i=0 then bl:=false;
if bl=true then write('so vua nhap nguyen to.')
else write('so vua nhap khong nguyen to.');
readln;
end.
Var n.i:integer;
begin
readln(n);
i:=2;
while ( i <= n) and ( n mod i <>0) do
i:=i+1;
if i=n then writeln('n la so nguyen to')
else writeln('n khong la nguyen to');
readln;
end.
var n,dem:integer;
begin
readln(n);
if n<=1 then write(' n khong la so nguyen to');
else
begin
dem:=2;
while (n mod dem <> 0) do dem:=dem+1;
if dem=n then write (' n la so nguyen to') else write(' n khong la so nguyen to');
end;
end.