using System; class Program { public static void Main(string[] args) { long n = long.Parse(Console.ReadLine()); long upper = (long)Math.Min(Math.Sqrt(n) + 1, n - 1); bool[] used = new bool[upper]; bool[] prime = new bool[upper]; if (upper >= 3) { used[2] = true; prime[2] = true; } if (upper >= 4) { used[3] = true; prime[3] = true; } for (long i = 2; i <= Math.Sqrt(n); i++) { if (n % i == 0) { if (!used[i]) { used[i] = true; long d = (long)Math.Min(Math.Sqrt(n) + 1, n - 1); bool isPrime = true; for (long k = 2; k <= d; k++) { if (i%k == 0) { isPrime = false; break; } } prime[i] = isPrime; } if (!prime[i]) { Console.WriteLine("YES"); return; } } } Console.WriteLine("NO"); } }