program ktsnt ;
var n : integer;
function ktsnt(m:integer):boolean;
var j:integer;kq:boolean;
begin
kq:=true;
for j:=2 to m-1 do
begin
if m mod j =0 then kq:=false;
end;
ktsnt:=kq;
end;
begin
write('nhap n='); readln(n);
if ktsnt(n)=true then write('Day la so nguyen to') else write('Day khong phai la so nguyen to');
readln
end.