

Time Limit: 2 sec / Memory Limit: 256 MB
配点 : 点
問題文
シカのAtCoDeerくんは二次元平面上で旅行をしようとしています。 AtCoDeerくんの旅行プランでは、時刻 に 点 を出発し、 以上 以下の各 に対し、時刻 に 点 を訪れる予定です。
AtCoDeerくんが時刻 に 点 にいる時、 時刻 には 点 , , , のうちいずれかに存在することができます。 その場にとどまることは出来ないことに注意してください。 AtCoDeerくんの旅行プランが実行可能かどうか判定してください。
制約
- ( )
- 入力は全て整数
入力
入力は以下の形式で標準入力から与えられる。
出力
旅行プランが実行可能ならYes
を、不可能ならNo
を出力してください。
入力例 1Copy
2 3 1 2 6 1 1
出力例 1Copy
Yes
例えば、, , , , , , と移動すればよいです。
入力例 2Copy
1 2 100 100
出力例 2Copy
No
にいる状態から 秒後に にいるのは不可能です。
入力例 3Copy
2 5 1 1 100 1 1
出力例 3Copy
No
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
.
Sample Input 1Copy
2 3 1 2 6 1 1
Sample Output 1Copy
Yes
For example, he can travel as follows: , , , , , , then .
Sample Input 2Copy
1 2 100 100
Sample Output 2Copy
No
It is impossible to be at two seconds after being at .
Sample Input 3Copy
2 5 1 1 100 1 1
Sample Output 3Copy
No