Author: | Антон Карабанов | Time limit: | 1 sec | |
Input file: | Standard input | Memory limit: | 512 Mb | |
Output file: | Standard output |
Today, in a mathematics lesson, Timofey studied the topic of "Proportions". He was too lazy to write down his homework in his notebook, relying on his memory, and here is the result — Timofey remembers three of the four members of the proportion, but does not remember where they stood! He is also sure that the answer to the problem (an unknown element of proportion) is as a natural number. Help Timofey find all the correct answers for this assignment.
The first line of the input contains three integers separated by space: a, b and c — known members of the proportion.
Output natural numbers in ascending order — all possible different solutions of the proportion. If there are no solutions — output the number -1.
1 ≤ a, b, c ≤ 109
In the first example, it is possible to make this proportion: 24 = 36.
In the second sample, there are no suitable solutions (with an integer answer).
In the third sample, it is possible to make these proportions: 24 = 816, 24 = 48, 12 = 48.
No. | Standard input | Standard output |
---|---|---|
1 |
|
|
2 |
|
|
3 |
|
|