import math n=int(input()) a=0 for i in range(2,int(math.sqrt(n))+1): if n % i ==0: a += 1 break if n==1 or a > 0: print('No') else: print('Yes')