#P14257. 嫉妒(jealousy)
嫉妒(jealousy)
Description
Little S is going to interview at the bookstore where Little Y works part-time, but she wants to keep it a secret for now.
There are a total of interviews. The first interview starts when the bookstore opens, and each interview lasts for minutes, with the next one immediately following the previous one. Specifically, let the bookstore opening time be minute . The -th interview takes place from minute to minute .
Little Y arrives at the bookstore to work at minute . He starts from the interview room door, inspects around the bookshelves, and returns to the interview room door every minutes. Specifically, he will be at the interview room door at minute , where is a non-negative integer.
If Little Y is exactly at the interview room door when Little S's interview starts or ends, she will be discovered. Little S wants to know whether there exists at least one interview among the interviews that she can attend without being discovered. In other words, whether there exists a positive integer satisfying , and there is no non-negative integer such that or .
Input Format
Input a single line containing four integers , representing the number of interviews, the start time of Little Y's work, the duration of one interview, and the time it takes to complete one round of inspection, respectively.
Output Format
Output a string on a single line: if there is an interview that Little S can attend without being discovered, output Yes; otherwise, output No.
2 0 2 5
Yes
1 0 1 9
No
Hint
【Sample 1 Explanation】
Little Y is at the interview room door at minutes .
The first interview lasts from minute to minute , and would be discovered at minute ; the second interview lasts from minute to minute . If Little S attends this one, she will not be discovered, so output Yes.
【Sample 2 Explanation】
Little Y is at the interview room door at minutes .
The only interview Little S can attend lasts from minute to minute , and would be discovered at minute , so output No.
【Sample 3】
See jealousy3.in and jealousy3.ans in the problem attachment.
This sample satisfies special properties AB.
【Sample 4】
See jealousy4.in and jealousy4.ans in the problem attachment.
This sample satisfies special properties BC.
【Data Range】
For all test data, it is guaranteed that: , , .
::cute-table{tuack}
| Test Data ID | Special Properties | |
|---|---|---|
| A | ||
| B | ||
| ^ | AB | |
| C | ||
| None | ||
Special Property A: It is guaranteed that .
Special Property B: It is guaranteed that .
Special Property C: It is guaranteed that .
Here, denotes that divides , meaning there exists an integer such that .
京公网安备 11011102002149号