There is a fight between a boss and his 3 employees. But instead of firing, the boss invites them to a judo fight. As if that was not enough, he says that 2 employees can come together to fight him. If we define the power of the 3 employees as P1,P2 and P3, and W is the power of the boss. Now, the fight is won by the team which has higher total combined power. In case of same power, the employees win. You need to check if the employees can win or not.
The input contains 4 lines: P1, P2, P3 and W, in this order only.
Output a single word: "YES" if the employees can win, "NO" otherwise. Don't print the quotes in the output.
- 1 ≤ P1,P2,P3 ≤ 5
- 1 ≤ W ≤ 20
Input: 1 2 3 7 Output: NO
ExplanationWe take 1 + 2 , 2 + 3 or 1 + 3, but all are less than 7. So the boss is invincible.
|Tags||ad-hoc, cakewalk, proc2016, rounaqwl66|
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA|
Fetching successful submissions