Program nguyento;
Uses Crt;
Var n,d,k:longint;
Begin Clrscr;
write('n=');
Readln(n);
k:=0;
For d:=1 to n do
If n mod d = 0 then
k:=k+1;
If k=2 then
write ('n la so nguyen to');
Readln;
End.
var n:integer;
a,d:word;
begin
write('n=');readln(n);
if n <2 then writeln(n,' khong phai la so nguyen to ')
else begin
d:=0;
for a:=2 to n div 2 do
if (n mod a=0) then d:=d+1;
if d=0 then writeln(n,' la so nguyen to ')
else writeln(n,' khong phai la so nguyen to ');
end;
readln;
end.
program nguyen_to;
uses Crt;
var n,d,k:longint;
begin clrscr;
write('n=');
readln(n);
k:=0;
for d:=1 to n do
if n mod d = 0 then
k:=k+1;
if k=2 then
write ('n la so nguyen to');
readln;
end.