Pineapple Incident

题意翻译

## 题目描述 Ted有一个菠萝。这个菠萝可以像狗一样叫!在第 $t$ 秒它第一次叫。然后每隔 $s$ 秒之后它会叫一次,在叫这一次之后还会在后一秒再叫一次。意思就是说它会在 $t$ 秒,$t+s$ 秒,$t+s+1$ 秒,$t+2s$ 秒,$t+2s+1$ 秒分别叫一次,以此类推。 Barney在早上醒来,他想吃个菠萝,但这只菠萝叫的时候Barney不能吃它。Barney打算在 $x$ 秒吃它,所以请你告诉Barney在x秒的时候,这个菠萝会不会叫。 ## 输入格式 仅输入一行,输入 $t,s,x$($0\le t,x\le 10^9$,$2\leq s\leq 10^9$)分别为菠萝第一次叫的时间,叫的间隔以及Barney想吃的时间。 ## 输出格式 如果菠萝要叫的话,输出YES,否则输出NO。

题目描述

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+2s $ , $ t+2s+1 $ , etc. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF697A/8add9bcf599ef4b682b24547071d5ac86538509a.png)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.

输入输出格式

输入格式


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.

输出格式


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.

输入输出样例

输入样例 #1

3 10 4

输出样例 #1

NO

输入样例 #2

3 10 3

输出样例 #2

YES

输入样例 #3

3 8 51

输出样例 #3

YES

输入样例 #4

3 8 52

输出样例 #4

YES

说明

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 $ .