n = int(input()) cnt = 0 p = 2 while p * p <= n: if n % p == 0: cnt += 1 while n % p == 0: n //= p p += 1 if n > 1: cnt += 1 print("Yes" if cnt <= 2 else "No")