Guess the number#2500

Guess the number

2 seconds
256 megabytes
Easy

Recently, a popular social network introduced an application called Guess the Number!. In this game, players are challenged to find a hidden number at each level using certain clues.

In one of the most difficult levels, you are required to determine a rational number such that 0 < x < 1. The clue is that when is multiplied by a natural number , exactly one alteration occurs in its decimal representation: the -th and -th digits after the decimal point are swapped. The digits are numbered from the first position after the decimal point, counting from left to right. The digit before the decimal point remains unchanged, which means the inequality 0 < kx < 1 holds. Note that the decimal representation of may originally have infinitely many digits after the decimal point.

Your task is to write a program that determines the value of given the integers , , and .

Input

The first line contains three integers , , (1 \leq i < j \leq 1000; 2 \leq k \leq 10^9).

Output

If such a number exists, output two integers — the numerator and denominator (a > 0, b > 0) of the irreducible fraction defining the number. If there is no such number, output NO SOLUTION.

Examples

Example 1

Loading
Loading