#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*/ printf(char *);
int /*<<< orphan*/ scanf(char *, long *, long *, long *);
int main() {
  long t, s, x;
  scanf("%I32d %I32d %I32d\n", &t, &s, &x);
  x -= t;
  if (x < 0 || x == 1 || ((x - 1) % s && x % s))
    printf("NO");
  else
    printf("YES");
}


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)
cmpq   $0x0,-0x20(%rbp)
jl     1198 <main+0x78>
cmpq   $0x1,-0x20(%rbp)
je     1198 <main+0x78>
mov    -0x20(%rbp),%rax
sub    $0x1,%rax
cqto
idivq  -0x18(%rbp)
cmp    $0x0,%rdx
je     11a9 <main+0x89>
mov    -0x20(%rbp),%rax
cqto
idivq  -0x18(%rbp)
cmp    $0x0,%rdx
je     11a9 <main+0x89>
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
jmp    11b5 <main+0x95>
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%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)
lea    0xec2(%rip),%rdi
js     11a3 <main+0x83>
cmp    $0x1,%rcx
je     11a3 <main+0x83>
lea    -0x1(%rcx),%rax
mov    0x8(%rsp),%rsi
mov    %rax,%rdx
or     %rsi,%rdx
shr    $0x20,%rdx
je     117a <main+0x5a>
cqto
idiv   %rsi
test   %rdx,%rdx
jne    1183 <main+0x63>
jmp    119c <main+0x7c>
xor    %edx,%edx
div    %esi
test   %rdx,%rdx
je     119c <main+0x7c>
mov    %rcx,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     11af <main+0x8f>
mov    %rcx,%rax
cqto
idiv   %rsi
test   %rdx,%rdx
jne    11a3 <main+0x83>
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret
mov    %ecx,%eax
xor    %edx,%edx
div    %esi
test   %rdx,%rdx
jne    11a3 <main+0x83>
jmp    119c <main+0x7c>

LLVM IR (-O0):
@.str = [19 x i8] c"%I32d %I32d %I32d\0A\00"
@.str.1 = [3 x i8] c"NO\00"
@.str.2 = [4 x i8] c"YES\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 ([19 x i8], [19 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 = icmp slt i64 %9, 0
br i1 %10, label %25, label %11
11: ; preds = %0
%12 = load i64, i64* %4
%13 = icmp eq i64 %12, 1
br i1 %13, label %25, label %14
14: ; preds = %11
%15 = load i64, i64* %4
%16 = sub nsw i64 %15, 1
%17 = load i64, i64* %3
%18 = srem i64 %16, %17
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %27
20: ; preds = %14
%21 = load i64, i64* %4
%22 = load i64, i64* %3
%23 = srem i64 %21, %22
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %20, %11, %0
%26 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %29
27: ; preds = %20, %14
%28 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %29
29: ; preds = %27, %25
%30 = load i32, i32* %1
ret i32 %30
}

LLVM IR (-O2):
@.str = [19 x i8] c"%I32d %I32d %I32d\0A\00"
@.str.1 = [3 x i8] c"NO\00"
@.str.2 = [4 x i8] c"YES\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 ([19 x i8], [19 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 = icmp slt i64 %10, 0
%12 = icmp eq i64 %10, 1
%13 = or i1 %11, %12
br i1 %13, label %23, label %14
14: ; preds = %0
%15 = add nsw i64 %10, -1
%16 = load i64, i64* %2
%17 = srem i64 %15, %16
%18 = icmp eq i64 %17, 0
br i1 %18, label %22, label %19
19: ; preds = %14
%20 = srem i64 %10, %16
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %19, %14
br label %23
23: ; preds = %0, %19, %22
%24 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), %22 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %19 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %0 ]
%25 = call i32 @printf(i8* dereferenceable(1) %24)
ret i32 0
}