404498: GYM101521 B Salt Trading

Memory Limit:64 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

B. Salt Tradingtime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard output

In the ancient kingdom by the name of Harkerland, where salt is aplenty, people often carry large bags of salt to neighbouring kingdoms for trading. In Harkerland, one kilohark (kh) of salt is worth exactly H$1. Harkerland is so vast, that it borders more than 10 kingdoms. Of these kingdoms, however, most are coastal and salt would not sell a good price there. Only three kingdoms are inland and merchants there would certainly purchase salt at a rate higher than H$1/kh.

The three inland kingdoms, Arabia, Babytonia, and Colonia, are as labelled in the map above.

  • Arabian merchants are willing to buy salt at a rate H$A/kh.
  • Babytonian merchants are willing to buy salt at a rate H$B/kh.
  • Colonian merchants are willing to buy salt at a rate H$C/kh.

Here, A, B, C are real numbers larger than 1, given with exactly two decimal places.

RB is a millionaire and a bit of a celebrity in Harkerland. Recently, he has successfully traded ten copies of his autographs for 100 kiloharks of salt. Despite RB's excessive liking for salt, his salt warehouse is already full and cannot take even an extra grain of salt. Therefore, RB decides to trade salt for gold.

RB wants to send three traders, one to Arabia, one to Babytonia, and one to Colonia, each carrying a portion of RB's salt. RB believes that 3 is a good number, hence exactly three traders are to be dispatched, even though some of them may end up carrying no salt at all. In addition, RB believes that dreams foretell future events. Last night, he dreamed that two of his traders would be robbed on the way, and hence only one trader would return with money.

Surely RB wants to maximize his profit, but being a cautious person, he wants first to ensure that he will earn a positive amount of money in this trade. To be precise, RB wants to distribute his 100 kiloharks of salt among the three traders in a way, such that if exactly one trader is able to return, no matter which one, that trader would return with more than H$100, the total value of the salt RB originally has.

Given the values of A, B, and C, your task is to determine whether RB can earn money in the worst case by suitable allocation of his 100 kiloharks of salt.

Here are several assumptions related to the problem:

  • The traders receive no monetary reward for their hard work — for them, being able to work for RB is itself their single biggest reward.
  • Salt can be measured with arbitrary precision. For example, RB can let one of his traders carry kh, π kh, or 10 - 6 kh of salt.
  • Harkerland currency can take any real value.
  • Nothing will be lost during transport, except due to robbery.
Input

The first and only line of input consists of three space-separated real numbers A, B, and C, the selling prices of 1kh of salt in Arabia, Babytonia, and Colonia, respectively. Recall that A, B, C are real numbers larger than 1, given with exactly two decimal places. (1 < A, B, C ≤ 1000)

Output

If RB can earn money in the worst case by suitable allocation of his 100 kiloharks of salt, output Yes. Otherwise, output No.

ExamplesInput
3.00 3.00 3.00
Output
No
Input
3.00 4.00 2.95
Output
Yes
Note

For sample test 1, the best RB can do is to distribute kh of salt to each of the three traders. In this case, any returning trader would carry H$ = H$100.

For sample test 2, RB can, for instance, give 34 kiloharks of salt to the trader heading to Arabia, 25.543 kiloharks of salt to the trader heading to Babytonia, and 40.457 kiloharks of salt to the trader heading to Colonia.

  • If the Arabia-bound trader returns, RB would get H$3.00 × 34 = H$102.
  • If the Babytonia-bound trader returns, RB would get H$4.00 × 25.543 = H$102.172.
  • If the Colonia-bound trader returns, RB would get H$2.95 × 40.457 = H$119.34815.

In the worst case that the Arabia-bound trader returns, RB could still earn H$2.

加入题单

算法标签: