#abc223e. [abc223_e]Placing Rectangles
[abc223_e]Placing Rectangles
Problem Statement
For positive integers and , a rectangle in a two-dimensional plane that satisfies the conditions below is said to be good.
- Every edge is parallel to the - or -axis.
- For every vertex, its -coordinate is an integer between and (inclusive), and -coordinate is an integer between and (inclusive).
Determine whether it is possible to place the following three good rectangles without overlapping: a good rectangle of an area at least , another of an area at least , and another of an area at least .
Here, three rectangles are considered to be non-overlapping when the intersection of any two of them has an area of .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
If it is possible to place three rectangles under the conditions specified in the Problem Statement, print Yes
; otherwise, print No
.
Sample Input 1
3 3 2 2 3
Sample Output 1
Yes
The figure below shows a possible placement, where the number in a rectangle represents its area.
We can see that , satisfying the conditions.
Sample Input 2
3 3 4 4 1
Sample Output 2
No
There is no possible placement under the conditions.
Sample Input 3
1000000000 1000000000 1000000000000000000 1000000000000000000 1000000000000000000
Sample Output 3
No