Codeforces Round 362 (Div. 2)
A
Pineapple Incident
Codeforces
900
原题
←B →
翻译中…

Ted has a pineapple. This pineapple is able to bark like a bulldog! At time $*t*$ (in seconds) it barks for the first time. Then every $*s*$ seconds after it, it barks twice with $1$ second interval. Thus it barks at times $*t*$, $*t* + *s*$, $*t* + *s* + 1$, $*t* + 2*s*$, $*t* + 2*s* + 1$, etc.

翻译中…

image

翻译中…

Barney woke up in the morning and wants to eat the pineapple, but he can't eat it when it's barking. Barney plans to eat it at time $*x*$ (in seconds), so he asked you to tell him if it's gonna bark at that time.

翻译中…

Input

翻译中…

The first and only line of input contains three integers $*t*$, $*s*$ and $*x*$ ($0 ≤ *t*, *x* ≤ 10^{9}$, $2 ≤ *s* ≤ 10^{9}$) — the time the pineapple barks for the first time, the pineapple barking interval, and the time Barney wants to eat the pineapple respectively.

翻译中…

Output

翻译中…

Print a single "YES" (without quotes) if the pineapple will bark at time $*x*$ or a single "NO" (without quotes) otherwise in the only line of output.

翻译中…

Note

翻译中…

In the first and the second sample cases pineapple will bark at moments $3$, $13$, $14$, ..., so it won't bark at the moment $4$ and will bark at the moment $3$.

翻译中…

In the third and fourth sample cases pineapple will bark at moments $3$, $11$, $12$, $19$, $20$, $27$, $28$, $35$, $36$, $43$, $44$, $51$, $52$, $59$, ..., so it will bark at both moments $51$ and $52$.

翻译中…

样例

Input #1
3 10 4
Output #1
NO
InputCopy OutputCopy
Input #2
3 10 3
Output #2
YES
InputCopy OutputCopy
Input #3
3 8 51
Output #3
YES
InputCopy OutputCopy
Input #4
3 8 52
Output #4
YES
InputCopy OutputCopy
题目信息
题号
697A
时间限制
1 s
内存限制
256 MB
标签
模拟
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。