import math N=int(input()) use=set() for i in range(2,math.ceil(math.sqrt(N))): while N%i==0: N//=i use.add(i) if N!=1: use.add(N) if len(use)<=2: print('Yes') else: print('No')