import math n = input() result = [] for i in xrange(2, (int)(math.sqrt(n))): if n % i == 0: result.append(i) if 3 < len(result): print "YES" else: print "NO"