def fact(n): _N = n #上限 ans = [] i = 2 while i*i <= _N: if n%i == 0: cnt = 0 while n%i == 0: cnt += 1 n //= i ans.append([i,cnt]) #[素因数,個数] else: i += 1 if n != 1: ans.append([n,1]) return ans N = int(input()) K = fact(N) if len(K) <= 2: print("Yes") else: print("No")