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 n = int(input()) if n == 1: print('No') exit() print('Yes' if len(set(factorization(n))) <= 2 else 'No')