from collections import Counter N = int(input()) primes = [] for i in range(int(N ** 0.5) + 1): while N % i == 0: primes.append(i) N //= i if N >= 2: primes.append(N) cnt_kinds = Counter(primes) if len(list(cnt_kinds.keys())) <= 2: print("Yes") else: print("No")