program CheckPrime;
var
s: string;
n: integer;
function IsPrime(n: integer): boolean;
var
i: integer;
begin
if n < 2 then
IsPrime := false
else
begin
IsPrime := true;
for i := 2 to Trunc(Sqrt(n)) do
begin
if n mod i = 0 then
begin
IsPrime := false;
Break;
end;
end;
end;
end;
begin
Write('Nhap vao mot chuoi: ');
ReadLn(s);
n := StrToInt(s);
if IsPrime(n) then
WriteLn('Day la mot so nguyen to')
else
WriteLn('Day khong phai la mot so nguyen to');
end.