Олимпиадный тренинг

Задача 38278. Alyona, remember Viti's age!


Victor is madly in love with statistics. Still — their birthdays fall on the same day of the year with their older brother! Now every year on his birthday, he writes down how old he and his brother are, and tries to find something interesting in these records.

Today is Viti's birthday, and he showed his notes to Alena. Vitya knows that she also likes to explore all sorts of sets of numbers and find patterns in them. Alena immediately noticed an interesting moment: when Vitya was n years old on one of his previous birthdays, his brother was m years old, and today Vitya is exactly k times younger than his brother!

Returning home in the evening, Alena became interested in the question: is this data enough to calculate how old Vitya turned today? Alena quickly coped, but can you solve this difficult task and find out by the numbers n, m and k, how old is Vita?

Input
The input consists of three lines, each containing one natural number: n , m and k — the age of Vitya and his brother in the old days, as well as how many times Vitya is younger than his brother today ( 1 ≤ n < m ≤ 10 000 , 2 ≤ k ≤ 10 000 ).

Imprint
If the situation described in the condition could happen, print a single number t — how old is Vita today.

If Vitya and Alena made a mistake and the described situation could not have happened, print the number - 1 .
 
# Input Output
1 4
15
2
11
2 4
15
3
-1
3 4
8
2
-1