Simple Factorials
A malfunctioning device, known as a bulbulator, instead of computing the standard factorial, calculates the "prime factorial"—the product of all prime numbers up to a given number. This "prime factorial" function only operates correctly for prime numbers; otherwise, the bulbulator malfunctions. During an experiment with the bulbulator, Misha calculated the difference between two prime factorials and remembered the result, but forgot the original numbers. Your task is to write a program that identifies the two prime numbers.
Input
The input file contains the number Misha recalled, which can have up to 5000 digits.
Output
Print NO if the number is not the difference between two prime factorials. Otherwise, print YES on the first line, and on the second line, the larger of the two prime numbers.