In the country where Youngsun lives, there are two kinds of coins, A and B. Every product in this country has a price of the form A×p+B×q (p and q are non-negative integers), so these two coins are enough.
One day Youngsun wondered whether a different coin system could also make the price of every product in this country.
Given A, B, and X, write a program that finds the values of two coins that can make every price of the form A×p+B×q. One coin has value X and the other has value Y (Y=X). Since X is given in the input, the task is to find Y. In the new system each coin can also be used any non-negative integer number of times, and Y is a positive integer.