a=int(input()) def prime_factors(n): i = 2 factors = [] while i * i <= n: if n % i: i += 1 else: n //= i factors.append(i) if n > 1: factors.append(n) return factors b=prime_factors(a) if a==1: print("Yes") exit() if len(set(b)) ==2 or len(set(b)) ==1: print("Yes") else: print("No")