const lines = require('fs').readFileSync('/dev/stdin', 'utf-8') .trim().split(' ').values(); const N = Number(lines.next().value); if (N == 1) { console.log('NO'); return; } const primes = Array(N + 1).fill(true); primes[0] = false; primes[1] = false; for (let i = 2; i <= Math.sqrt(N); i++) { if (primes[i]) { for (let j = i + i; j <= N; j += i) { primes[j] = false; } } } for (let i = 2; i <= Math.sqrt(N); i++) { if (N % i === 0 && !primes[i]) { console.log('YES'); return; } } console.log('NO');