#!/usr/bin/env python3 #fileencoding: utf-8 from math import sqrt def isprime(n): if n % 2 == 0: return False for i in range(3,int(sqrt(n)),2): if n % i == 0: return False return True N = int(input()) primes = [2] for i in range(3,int(sqrt(N)),2): if isprime(i): primes.append(i) count = 0 for i in primes: if N % i == 0: N /= i count += 1 if N > 1: count += 1 print("YES" if count >= 3 else "NO")