var i,n:longint;begin readln(n); for i:=2 to trunc(sqrt(n)) do if n mod i=0 then break; if n mod i=<>0 then writeln('Yes') else writeln('No')end.