import math N = int(input()) d = [x for x in range(2, int(math.sqrt(N))+1) if N % x == 0] if len(d) > 1: print("YES") elif (len(d) == 1 and N % d[0] ** 2 == 0 and N != d[0] ** 2): print("YES") else: print("NO")