atcoder#ARC089A. [ABC086C] Traveling
[ABC086C] Traveling
Score : points
Problem Statement
AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point at time , then for each between and (inclusive), he will visit point at time .
If AtCoDeer is at point at time , he can be at one of the following points at time : , , and . Note that he cannot stay at his place. Determine whether he can carry out his plan.
Constraints
- ( )
- All input values are integers.
Input
Input is given from Standard Input in the following format:
Output
If AtCoDeer can carry out his plan, print Yes
; if he cannot, print No
.
2
3 1 2
6 1 1
Yes
For example, he can travel as follows: , , , , , , then .
1
2 100 100
No
It is impossible to be at two seconds after being at .
2
5 1 1
100 1 1
No