n = int(input()) cnt = 0 for p in range(2, 10 ** 7): while n % p == 0: n //= p cnt += 1 cnt += n > 1 print('YES' if cnt >= 3 else 'NO')