403166: GYM101059 A Horrible boss
Memory Limit:64 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
A. Horrible bosstime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard output
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.
InputThe input contains 4 lines of input: P1, P2, P3 and W in this order only.
OutputOutput a single word: "YES" if the employees can win, "NO" otherwise. Don't print the quotes in the output.
ExampleInput1Output
2
3
7
NO