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 c += N==1?0:1 puts c<=2?"Yes":"No"