The best approximation of pi#245

The best approximation of pi

1 second
64 megabytes
Very easy

The number represents the ratio of a circle's circumference to its diameter, a concept known to humans since ancient times. Over the centuries, people have sought to determine the numerical value of . One method involved expressing as a common fraction. For instance, in Ancient Greece, the approximation was used.

Your task is to find the best approximation of in the form of a common fraction.

For this problem, use the value \pi \approx 3.1415926535897932385.

Input

The input consists of two integers and (1 \leq N, M \leq 1000), provided in a single line separated by a space.

Output

The output should be two integers and , separated by a space, such that 1 \leq P \leq N, 1 \leq R \leq M, and the irreducible fraction is the best approximation of .

Examples

Example 1

Loading
Loading