about summary refs log tree commit diff
path: root/codeforces/697a.c
blob: 576bc599129eda118a0b972749caa3a2dc5b72cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>

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;
}