D - Recorder Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MB

問題文

高橋君はあるテレビ番組(以下, 番組と表記)をレコーダーで録画していようとしています。
時刻 0 の時点で番組は時刻 A から時刻 A + R まで放送される予定です。しかし、番組編成の都合によって番組の放送時間は変更になることがあります。そこで高橋君は、番組を漏れなく録画するために以下の行動を取ることにしました。

  • 時刻 0 以降(時刻 0 を含む)のすべての D の倍数の時刻に以下の操作を行う。(この操作に時間はかからない。)
    • 現在の時刻を t, 時刻 t 時点での番組の放送が始まる予定の時刻を p, 放送が終わる予定の時刻を q とする。t \lt q である場合、時刻 \max(p, t) から時刻 q までの期間を録画予約する。

ただし、高橋君の持っているレコーダーは複数の録画予約を扱うことができるのに注意してください。つまり、すでに 1 個以上の録画予約が存在するときに、新たに高橋君が録画予約を行った場合でも、それ以前に行った録画予約は取り消されず、すべての録画予約が遂行されます。

前述の通り、時刻 0 の時点で番組は時刻 A から時刻 A + R まで放送される予定でした。ところが時刻 B に、番組の放送時刻が時刻 C から時刻 C + R までに変更されました。(ここで B < A, B < C, A \neq C かつ A,B,C はいずれも D の倍数でないことが保証されます。)

高橋君が番組を漏れなく録画できるかを判定してください。より厳密に述べると、以下の命題が真であるかを判定してください。

  • C 以上 C + R 以下のすべての時刻 t に対して、次の条件を満たす録画予約が少なくとも 1 つ存在する。
    • 録画予約が時刻 p から時刻 q までを期間とするとき、p \leq t \leq q が成り立つ。

制約

  • 1 \leq A, B, C, D, R \leq 1000
  • A, B, C, D, R は整数
  • B \lt \min(A, C)
  • A \neq C
  • A, B, C はいずれも D の倍数でない

入力

入力は以下の形式で標準入力から与えられる。

A B C D R

出力

問題文にある命題が真である場合は Yes を、そうでない場合は No を出力せよ。


入力例 1

5 3 15 20 20

出力例 1

Yes

高橋君の行動を説明すると次のようになります。

  • 時刻 0 の時点で番組は時刻 5 から時刻 25 まで放送される予定です。
  • 高橋君は時刻 0 に時刻 5 から時刻 25 までの期間を録画予約します。
  • 時刻 3 に番組の放送予定時刻が時刻 15 から時刻 35 までに変更されます。
  • 高橋君は時刻 20 に時刻 20 から時刻 35 までの期間を録画予約します。
  • 時刻 40 以降は番組の放送が終わる予定の時刻を過ぎているため録画予約を行いません。

15 \leq t \leq 20 の期間は 1 回目の録画予約で、20 \leq t \leq 35 の期間は 2 回目の録画予約でカバーされています。よって答えは Yes です。


入力例 2

5 3 27 30 20

出力例 2

No

入力例 3

930 542 605 509 582

出力例 3

No

Problem Statement

Takahashi is trying to record a certain television program (hereafter called "the program") with a recorder.
At time 0, the program is scheduled to be broadcasted from time A to time A + R. However, the broadcast time of the program may change due to programming circumstances. Therefore, Takahashi has decided to take the following actions to record the entire program.

  • Perform the following operation at all times that are multiples of D after time 0 (including time 0). (This operation takes no time.)
    • Let t be the current time, and p and q be the program's start and end times scheduled at time t, respectively. If t \lt q, reserve to record from time \max(p, t) to time q.

Here, note that Takahashi's recorder can handle multiple recording reservations. In other words, even if Takahashi makes a new recording reservation when there is already one or more recording reservations, the previous recording reservations are not canceled, and all recording reservations are carried out.

As mentioned earlier, the program was scheduled to be broadcasted from time A to time A + R at time 0. However, at time B, the broadcast time of the program was changed to be from time C to time C + R. (Here, it is guaranteed that B < A, B < C, A \neq C, and none of A, B, C is a multiple of D.)

Please determine whether Takahashi can record the entire program. More precisely, determine whether the following proposition is true.

  • For all times t between C and C + R, inclusive, there is at least one recording reservation that satisfies the following conditions.
    • If the recording reservation is from time p to time q, it holds that p \leq t \leq q.

Constraints

  • 1 \leq A, B, C, D, R \leq 1000
  • A, B, C, D, and R are integers.
  • B \lt \min(A, C)
  • A \neq C
  • None of A, B, and C is a multiple of D.

Input

The input is given from Standard Input in the following format:

A B C D R

Output

If the proposition in the problem statement is true, print Yes; otherwise, print No.

Sample Explanation


Sample Input 1

5 3 15 20 20

Sample Output 1

Yes

Takahashi's actions can be described as follows.

  • At time 0, the program is scheduled to be broadcasted from time 5 to time 25.
  • Takahashi reserves to record from time 5 to time 25 at time 0.
  • At time 3, the scheduled broadcast time of the program is changed to be from time 15 to time 35.
  • Takahashi reserves to record from time 20 to time 35 at time 20.
  • Takahashi does not make any recording reservations after time 40 as it is past the scheduled end time of the program.

The period 15 \leq t \leq 20 is covered by the first recording reservation, and the period 20 \leq t \leq 35 is covered by the second recording reservation. Therefore, the answer is Yes.


Sample Input 2

5 3 27 30 20

Sample Output 2

No

Sample Input 3

930 542 605 509 582

Sample Output 3

No