import sys import math import bisect from heapq import heapify, heappop, heappush from collections import deque, defaultdict, Counter from functools import lru_cache from itertools import accumulate, combinations, permutations, product sys.set_int_max_str_digits(10 ** 6) sys.setrecursionlimit(1000000) MOD = 10 ** 9 + 7 MOD99 = 998244353 input = lambda: sys.stdin.readline().strip() NI = lambda: int(input()) NMI = lambda: map(int, input().split()) NLI = lambda: list(NMI()) SI = lambda: input() SMI = lambda: input().split() SLI = lambda: list(SMI()) EI = lambda m: [NLI() for _ in range(m)] # 高速エラストテネス sieve[n]はnの最小の素因数 def make_prime_table(n): sieve = list(range(n + 1)) sieve[0] = -1 sieve[1] = -1 for i in range(4, n + 1, 2): sieve[i] = 2 for i in range(3, int(n ** 0.5) + 1, 2): if sieve[i] != i: continue for j in range(i * i, n + 1, i * 2): if sieve[j] == j: sieve[j] = i return sieve prime_table = make_prime_table(1000) # 素数列挙 primes = [p for i, p in enumerate(prime_table) if i == p] # 素因数分解 上のprime_tableと組み合わせて使う def prime_factorize(n): result = [] while n != 1: p = prime_table[n] e = 0 while n % p == 0: n //= p e += 1 result.append((p, e)) return result # Nの素因数分解を辞書で返す(単体) def prime_fact(n): root = int(n**0.5) + 1 prime_dict = {} for i in range(2, root): cnt = 0 while n % i == 0: cnt += 1 n = n // i if cnt: prime_dict[i] = cnt if n != 1: prime_dict[n] = 1 return prime_dict # 約数列挙(単体) def divisors(x): res = set() for i in range(1, int(x**0.5) + 2): if x % i == 0: res.add(i) res.add(x//i) return res def main(): N = NI() P = prime_fact(N) if len(P) <= 2: print("Yes") else: print("No") if __name__ == "__main__": main()