Guess the number
Recently, a popular social network launched an application called "Guess the Number!". In this game, players are challenged to identify a hidden number at each level using specific clues.
In one of the most difficult levels, you need to guess a rational number (x) where (0 < x < 1). The clue provided is that when (x) is multiplied by a natural number (k), exactly one change occurs in its decimal representation: the (i)-th and (j)-th digits after the decimal point are swapped. The digits are counted starting from one, from left to right. The digit before the decimal point remains unchanged, ensuring that (0 < kx < 1). Note that the original decimal representation of (x) may have infinitely many digits after the decimal point.
Your task is to develop a program that determines the value of (x) given the integers (i), (j), and (k).
Input
The input consists of a single line containing three integers (i), (j), (k) ((1 i < j 1000); (2 k 10^9)).
Output
If the desired number exists, output two integers — the numerator (a) and the denominator (b) of the irreducible fraction representing the desired number ((a, b > 0)). If no such number exists, output the phrase NO SOLUTION.