Score : $500$ points
For positive integers $X$ and $Y$, a rectangle in a two-dimensional plane that satisfies the conditions below is said to be good.
Determine whether it is possible to place the following three good rectangles without overlapping: a good rectangle of an area at least $A$, another of an area at least $B$, and another of an area at least $C$.
Here, three rectangles are considered to be non-overlapping when the intersection of any two of them has an area of $0$.
Input is given from Standard Input in the following format:
$X$ $Y$ $A$ $B$ $C$
If it is possible to place three rectangles under the conditions specified in the Problem Statement, print Yes
; otherwise, print No
.
3 3 2 2 3
Yes
The figure below shows a possible placement, where the number in a rectangle represents its area.
We can see that $2 \geq A, 3 \geq B, 3 \geq C$, satisfying the conditions.
3 3 4 4 1
No
There is no possible placement under the conditions.
1000000000 1000000000 1000000000000000000 1000000000000000000 1000000000000000000
No