Codeforces Beta Round 93 (Div. 1 Only)
A
Hot Bath
Codeforces
1900
原题
←B →
翻译中…

Bob is about to take a hot bath.

翻译中…

There are two taps to fill the bath: a hot water tap and a cold water tap. The cold water's temperature is $*t*_{1}$, and the hot water's temperature is $*t*_{2}$. The cold water tap can transmit any integer number of water units per second from $0$ to $*x*_{1}$, inclusive. Similarly, the hot water tap can transmit from $0$ to $*x*_{2}$ water units per second.

翻译中…

If $*y*_{1}$ water units per second flow through the first tap and $*y*_{2}$ water units per second flow through the second tap, then the resulting bath water temperature will be:

翻译中…

image

翻译中…

Bob wants to open both taps so that the bath water temperature was not less than $*t*_{0}$. However, the temperature should be as close as possible to this value. If there are several optimal variants, Bob chooses the one that lets fill the bath in the quickest way possible.

翻译中…

Determine how much each tap should be opened so that Bob was pleased with the result in the end.

翻译中…

Input

翻译中…

You are given five integers $*t*_{1}$, $*t*_{2}$, $*x*_{1}$, $*x*_{2}$ and $*t*_{0}$ ($1 ≤ *t*_{1} ≤ *t*_{0} ≤ *t*_{2} ≤ 10^{6}$, $1 ≤ *x*_{1}, *x*_{2} ≤ 10^{6}$).

翻译中…

Output

翻译中…

Print two space-separated integers $*y*_{1}$ and $*y*_{2}$ ($0 ≤ *y*_{1} ≤ *x*_{1}$, $0 ≤ *y*_{2} ≤ *x*_{2}$).

翻译中…

Note

翻译中…

In the second sample the hot water tap shouldn't be opened, but the cold water tap should be opened at full capacity in order to fill the bath in the quickest way possible.

翻译中…

样例

Input #1
10 70 100 100 25
Output #1
99 33
InputCopy OutputCopy
Input #2
300 500 1000 1000 300
Output #2
1000 0
InputCopy OutputCopy
Input #3
143 456 110 117 273
Output #3
76 54
InputCopy OutputCopy
题目信息
题号
126A
时间限制
2 s
内存限制
256 MB
标签
二分
暴力
数学

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