Codeforces Round 454 (Div. 2, based on Technocup 2018 Elimination Round 4)
A
Masha and Bears
Codeforces
1300
原题
←B →
翻译中…

A family consisting of father bear, mother bear and son bear owns three cars. Father bear can climb into the largest car and he likes it. Also, mother bear can climb into the middle car and she likes it. Moreover, son bear can climb into the smallest car and he likes it. It's known that the largest car is strictly larger than the middle car, and the middle car is strictly larger than the smallest car.

翻译中…

Masha came to test these cars. She could climb into all cars, but she liked only the smallest car.

翻译中…

It's known that a character with size $*a*$ can climb into some car with size $*b*$ if and only if $*a* ≤ *b*$, he or she likes it if and only if he can climb into this car and $2*a* ≥ *b*$.

翻译中…

You are given sizes of bears and Masha. Find out some possible integer non-negative sizes of cars.

翻译中…

Input

翻译中…

You are given four integers $*V*_{1}$, $*V*_{2}$, $*V*_{3}$, $*V*_{*m*}$($1 ≤ *V*_{*i*} ≤ 100$) — sizes of father bear, mother bear, son bear and Masha, respectively. It's guaranteed that $*V*_{1} > *V*_{2} > *V*_{3}$.

翻译中…

Output

翻译中…

Output three integers — sizes of father bear's car, mother bear's car and son bear's car, respectively.

翻译中…

If there are multiple possible solutions, print any.

翻译中…

If there is no solution, print "-1" (without quotes).

翻译中…

Note

翻译中…

In first test case all conditions for cars' sizes are satisfied.

翻译中…

In second test case there is no answer, because Masha should be able to climb into smallest car (so size of smallest car in not less than 21), but son bear should like it, so maximum possible size of it is 20.

翻译中…

样例

Input #1
50 30 10 10
Output #1
50
30
10
InputCopy OutputCopy
Input #2
100 50 10 21
Output #2
-1
InputCopy OutputCopy
题目信息
题号
907A
时间限制
2 s
内存限制
256 MB
标签
暴力
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。