var a,i:longint;t:boolean;
begin
t:=true;
readln(a);
if a=1 then writeln('NO');
if a1 then begin
for i:=2 to trunc(sqrt(a)) do
if a mod i=0 then t:=false;
if t then writeln('YES')else writeln('NO');
end;
end.
var a,i:longint;t:boolean;
begin
t:=true;
readln(a);
if a=1 then writeln('NO');
if a1 then begin
for i:=2 to trunc(sqrt(a)) do
if a mod i=0 then t:=false;
if t then writeln('YES')else writeln('NO');
end;
end.