def factorization(n): relist = [] if n == 1: relist = 1 for i in range(2, int(n ** 0.5) + 1): #割る数 while n % i == 0: relist.append(i) n /= i if n != 1: relist.append(int(n)) return relist print('Yes' if len(set(factorization(int(input())))) == 2 else 'No')