N,c=gets.to_i,0 for i in 2..(Integer.sqrt N) do if N%i==0 while N%i==0 do N /= i end c+=1 end end puts N==1&&c==2?"Yes":"No"