Under construction

Still being built. Things may change

Non-Prime 2

Time limit0.5sMemory limit1024 MB

Summary
Given a prime k with 0 < k < 1 and up to eight decimal digits, output a fraction p/q with p and q at most 10^9 that approximates k.
Level

Easy2 of 10

Topics
Implementation, Math
Solved
No attempts yet

Problem

A member of the contest staff, a KSA student, recently overcame their fear of prime numbers but can no longer tell one prime from another. To restore KSA's honor, read a prime kk and find any fraction pq\cfrac{p}{q} that represents kk.

pp and qq are positive integers at most 10910^{9}. The answer is correct if the absolute error or the relative error between kk and pq\cfrac{p}{q} is at most 10−610^{-6}.

Input

The first line contains the prime kk.

Output

On the first line, print YES if a fraction satisfying the condition exists, and NO otherwise.

If such a fraction exists, print two integers pp and qq separated by a space on the second line.

If there are multiple correct answers, you may print any of them.

Constraints

  • 0<k<10 < k < 1
  • kk is given with at most eight digits after the decimal point.
  • The decimal has no unnecessary trailing 00.

Hint

The absolute error is the difference between the true value and the approximation. The relative error is the absolute error divided by the true value. In this problem, the true value is kk, and the approximation is pq\cfrac{p}{q}.

Examples2

  1. Example 1

    Input
    0.25
    
    Expected output
    YES
    1 4
    
  2. Example 2

    Input
    0.333333
    
    Expected output
    YES
    1 3