#K82527. Can Amy Buy All Pastries?
Can Amy Buy All Pastries?
Can Amy Buy All Pastries?
Problem Description:
Amy wants to buy one of each type of pastry. She is given the prices of three pastries, denoted by (X), (Y), and (Z), and her available budget (W). Determine if Amy can purchase all three pastries with her budget. In mathematical terms, check if (X + Y + Z \leq W).
Output 'Yes' if she can buy all three pastries, otherwise output 'No'.
inputFormat
The input consists of four space-separated integers (X, Y, Z,) and (W) on a single line representing the cost of the three pastries and the available budget respectively.
outputFormat
Output a single line containing either "Yes" if Amy can buy all three pastries, or "No" if she cannot.## sample
10 15 25 50
Yes