N = int(input()) import sys p = -1 a = 0 for i in range(2,10 * 6 + 1): if N % i == 0: p = i while N % i == 0: N //= i a += 1 break if p == -1: print('Yes') exit() if N == 1: print('Yes') exit() else: q = -1 b = 0 for i in range(2,10 ** 6 + 1): if N % i == 0: while N % i == 0: N //= i if N == 1: print('Yes') else: print('No') exit()