#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, long *, long *, long *);
int main() {
  long t, s, x;
  scanf("%ld %ld %ld", &t, &s, &x);
  x -= t;
  if (((x % s == 1) && (x / s > 0)) || ((x % s == 0) && (x / s >= 0)))
    puts("YES");
  else
    puts("NO");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cqto
idivq  -0x18(%rbp)
cmp    $0x1,%rdx
jne    117e <main+0x5e>
mov    -0x20(%rbp),%rax
cqto
idivq  -0x18(%rbp)
cmp    $0x0,%rax
jg     11a6 <main+0x86>
mov    -0x20(%rbp),%rax
cqto
idivq  -0x18(%rbp)
cmp    $0x0,%rdx
jne    11b7 <main+0x97>
mov    -0x20(%rbp),%rax
cqto
idivq  -0x18(%rbp)
cmp    $0x0,%rax
jl     11b7 <main+0x97>
lea    0xe5f(%rip),%rdi
call   1030 <puts@plt>
jmp    11c3 <main+0xa3>
lea    0xe52(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1040 <scanf@plt>
mov    (%rsp),%rcx
sub    0x10(%rsp),%rcx
mov    %rcx,(%rsp)
mov    0x8(%rsp),%rsi
mov    %rcx,%rdi
or     %rsi,%rdi
shr    $0x20,%rdi
je     1189 <main+0x69>
mov    %rcx,%rax
cqto
idiv   %rsi
test   %rdx,%rdx
je     1194 <main+0x74>
cmp    $0x1,%rdx
jne    1180 <main+0x60>
test   %rdi,%rdi
je     11ac <main+0x8c>
mov    %rcx,%rax
cqto
idiv   %rsi
test   %rax,%rax
jg     1199 <main+0x79>
lea    0xe89(%rip),%rdi
jmp    11a0 <main+0x80>
mov    %ecx,%eax
xor    %edx,%edx
div    %esi
test   %rdx,%rdx
jne    1168 <main+0x48>
test   %rax,%rax
js     1180 <main+0x60>
lea    0xe6c(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret
mov    %ecx,%eax
xor    %edx,%edx
div    %esi
test   %rax,%rax
jg     1199 <main+0x79>
jmp    1180 <main+0x60>

LLVM IR (-O0):
@.str = [12 x i8] c"%ld %ld %ld\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64* %2, i64* %3, i64* %4)
%6 = load i64, i64* %2
%7 = load i64, i64* %4
%8 = sub nsw i64 %7, %6
store i64 %8, i64* %4
%9 = load i64, i64* %4
%10 = load i64, i64* %3
%11 = srem i64 %9, %10
%12 = icmp eq i64 %11, 1
br i1 %12, label %13, label %18
13: ; preds = %0
%14 = load i64, i64* %4
%15 = load i64, i64* %3
%16 = sdiv i64 %14, %15
%17 = icmp sgt i64 %16, 0
br i1 %17, label %28, label %18
18: ; preds = %13, %0
%19 = load i64, i64* %4
%20 = load i64, i64* %3
%21 = srem i64 %19, %20
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %30
23: ; preds = %18
%24 = load i64, i64* %4
%25 = load i64, i64* %3
%26 = sdiv i64 %24, %25
%27 = icmp sge i64 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %23, %13
%29 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %32
30: ; preds = %23, %18
%31 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %32
32: ; preds = %30, %28
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%ld %ld %ld\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = bitcast i64* %1 to i8*
%5 = bitcast i64* %2 to i8*
%6 = bitcast i64* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2, i64* %3)
%8 = load i64, i64* %1
%9 = load i64, i64* %3
%10 = sub nsw i64 %9, %8
store i64 %10, i64* %3
%11 = load i64, i64* %2
%12 = srem i64 %10, %11
%13 = sdiv i64 %10, %11
switch i64 %12, label %19 [
i64 1, label %14
i64 0, label %17
]
14: ; preds = %0
%15 = sdiv i64 %10, %11
%16 = icmp sgt i64 %15, 0
br i1 %16, label %20, label %19
17: ; preds = %0
%18 = icmp sgt i64 %13, -1
br i1 %18, label %20, label %19
19: ; preds = %0, %14, %17
br label %20
20: ; preds = %14, %17, %19
%21 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), %19 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %17 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %14 ]
%22 = call i32 @puts(i8* dereferenceable(1) %21)
ret i32 0
}