Problem:


Score : 100 points

Problem Statement

There are a total of A + B cats and dogs.
Among them, A are known to be cats, but the remaining B are not known to be either cats or dogs.

Determine if it is possible that there are exactly X cats among these A + B animals.

Constraints

1 \leq A \leq 100

1 \leq B \leq 100

1 \leq X \leq 200

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B X

Output

If it is possible that there are exactly X cats, print YES; if it is impossible, print NO.

Sample Input 1

3 5 4

Sample Output 1

YES

If there are one cat and four dogs among the B = 5 animals, there are X = 4 cats in total.

Sample Input 2

2 2 6

Sample Output 2

NO

Even if all of the B = 2 animals are cats, there are less than X = 6 cats in total.

Sample Input 3

5 3 2

Sample Output 3

NO

Even if all of the B = 3 animals are dogs, there are more than X = 2 cats in total.



Sample input:
3 5 4


Sample output:
YES

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
print('YES' if A <= X <= A + B else 'NO')

Submission status: Accepted

Solution code:
A,B,X = map(int,input().split())

if X - A < 0:
    print('NO')
else:
    if B >= X - A:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
n,m,k = map(int,input().split())
print('YES' if n <= k <= n+m else 'NO')

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
print('YES' if A + B >= X and X >= A else 'NO')

Submission status: Accepted

Solution code:

a,b,x = map(int,input().split())

if x-a <= b and x-a >= 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
if a<=x and x<=a+b:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
print('YES' if a <= c <= a + b else 'NO')

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
print('YES' if a <= x <= b+a else 'NO')

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
if (A > X) or (B <= X-A):
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
a,b,x = map(int,input().split())
if a <= x <= a+b:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
 
if(a>x):
    print('NO')
elif(a == x):
    print('YES')
elif(a + b >= x):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a,b,x=[int(i) for i in input().split()]

if a>x or a+b<x:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
linha = input()
gatos, animais, X = [int(n) for n in linha.split()]

if (X >= gatos and animais + gatos >= X):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())

if(a>x):
    print('NO')
elif(a == x):
    print('YES')
elif(a + b >= x):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
line = input()
known_cat_num, unknow_num, expected_cat_num = [int(n) for n in line.split()]
if (expected_cat_num < known_cat_num
        or expected_cat_num - known_cat_num > unknow_num):
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
line = input()
a, b, x = [int(n) for n in line.split()]

if x>(a+b) or x<a:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
cat, unknown, guess = map(int, input().split())
if guess > cat:
    if cat + unknown < guess:
        print('NO')
    else:
        print('YES')
else:
    if guess + unknown > cat + unknown:
        print('NO')
    else:
        if cat > guess:
            print('NO')
        else:
            print('YES')

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())

if (A > X):
  print("NO")

elif((A+B) < X):
  print("NO")

elif((A+B) >= X):
  print("YES")

Submission status: Accepted

Solution code:
line = input()
A, B, X = [int(u) for u in line.split()]
def func(a,b,x):
    return print("YES") if (x <a+b and x>=a) else print("NO")
func(A,B,X)

Submission status: Accepted

Solution code:
def main():
    line = input()
    A, B, X = [int(n) for n in line.split()]
    if A > X:
        print('NO')
    elif B + A < X:
        print('NO')
    else:
        print('YES')

main()

Submission status: Accepted

Solution code:
line = input()

a, b, c = [int(n) for n in line.split()]

if c <= a+b and c >= a:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
if a + b >= x:
    if a <= x:
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Submission status: Accepted

Solution code:
line = input()
A, B, X = [int(n) for n in line.split()]
if X < A or X > B+A:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
line = input()
a, b, x = [int(n) for n in line.split()]

largest = 0

z = a+b+x

if x < a:
    print("NO")
elif x > a+b:
    print("NO")
elif x <= a+b:
    print("YES")

Submission status: Accepted

Solution code:
num = input()
a = int(num.split(' ')[0])
b = int(num.split(' ')[1])
x = int(num.split(' ')[2])


if a+b>=x:
    if a>x:
        print("NO")
    else:
        print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())

if A+B >= X and X >= A:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
if A <= X <= A + B:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a,b,x = map(int, input().split())

if a > x:
  print('NO')
elif a+b < x:
  print('NO')
else:
  print('YES')

Submission status: Accepted

Solution code:
a,b,x = map(int,input().split())
 
if a > x :
  print('NO')
elif x-a <= b:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
if a+b>=c and a<=c:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
A,B,X=map(int,input().split())
if A<=X:
  if (X-A)<=B:
    print('YES')
  else:
    print('NO')
else:
  print('NO')

Submission status: Accepted

Solution code:
a,b,x = map(int, input().split())
if (a + b > x and a<=x):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a, b, c= map(int, input().split())
if a+b<c:
    print('NO')
elif a>c:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
if(a>x or a+b<x):
	print('NO')
elif(a+b>=x):
	print('YES')

Submission status: Accepted

Solution code:
import sys
a, b, x = map(int, input().split())

if a>x:
  print("NO")
  sys.exit()
if b >= x - a:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())

print("YES"if a<=x and a+b>=x else"NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
if x < a or x > (a + b):
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())

if X <= A + B - 1 and X >= A:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())

if x>=a and x<=(a+b):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
a, b, x = [int(x) for x in input().split()]

if a <= x <= a + b:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
if A <= X and (X-A) <= B:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
print('YES' if x>=a and x<=a+b else 'NO')

Submission status: Accepted

Solution code:
A,B,X = map(int,input().split())

if X>A+B or A>X:
  print('NO')
else:
  print('YES')

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
if a<=x<=a+b:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a,b,x = map(int,input().split())

if x>=a and x<=a+b:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
a,b,x = map(int, input().split())
if (a <= x  and  x <= a+b):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())

if A <= X <= A+B:
        print('YES')
else:
        print('NO')

Submission status: Accepted

Solution code:
a,b,x = map(int,input().split())
if a <= x <= a+b:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A,B,X=map(int,input().split())
if A>X:
  print('NO')
  exit
elif X>A+B:
  print('NO')
  exit
else:
  print('YES')

Submission status: Accepted

Solution code:
a,b,x = list(map(int, input().split()))
if(x >= a and  b >= (x - a)):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:

a, b, x = map(int, input().split())

print("NO" if a > x or a + b < x else "YES")

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
print("YES") if A <= X <= A+B else print("NO")

Submission status: Accepted

Solution code:
def main():
    a, b, x = map(int, input().split())
    if a+b < x or a > x:
        print("NO")
    else:
        print("YES")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    a,b,x = map(int, input().split())

    if a<=x and x<=a+b:
        print('YES')
    else:
        print('NO')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A,B,X=map(int,input().split())
if (A+B)>=X and X>=A:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import itertools
import math
import sys
import heapq
from collections import Counter
from collections import deque
from fractions import gcd
INF = 1 << 60
sys.setrecursionlimit(10 ** 6)

#ここから書き始める
a, b, x = map(int, input().split())
if a <= x <= a + b:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
if b>=x-a and a<=x:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
if a <= x and x <=a+b:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a,b,x = map(int, input().split())

if a <= x <= a+b:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

A, B, X = map(int, input().split())
print("YES" if A <= X <= A + B else "NO")

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())

if A<=X<=A+B:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
ans = 'YES' if a <= x and x <= a + b else 'NO'
print(ans)

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
print("YES" if a+b-x>=0 and x>=a else "NO")

Submission status: Accepted

Solution code:
A,B,X = map(int,input().split(" "))
if A+B<X:
    print("NO")
else:
    if A>X:
        print("NO")
    else:
        if (X-A)>B:
            print("NO")
        else:
            print("YES")

Submission status: Accepted

Solution code:
import itertools
def main():
  a,b,x = map(int,input().split())
  print("YES" if a <= x and b >= (x-a) else "NO")
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())

if a + b >= x and a <= x:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
if x >= a and x <= a + b:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
if A <= X and X <= A + B: print("YES")
else: print("NO")

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
if A <= X <= A + B:  
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:

def main():
    a,b,x = map(int,input().split())
    answer = "YES" if a <= x <= (a+b) else "NO"
    print(answer)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding: utf-8
A, B, X = map(int, input().split())
# print(A, B, X)
if X - A >= 0 and B >= X - A:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a,b,x = map(int,input().split())
if a <= x <= a+b:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
print('YES') if a <= x <= ( a+b ) else print('NO')

Submission status: Accepted

Solution code:
a, b, x = map(int,input().split())
if a <= x <= a+b:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B, X = il()
    print('YES' if A > X - B and X >= A else 'NO')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

a, b, x = map(int, sys.stdin.readline().split())

def main():
    ans = 'YES' if a <= x <= a + b else 'NO'
    print(ans)

if __name__ ==  '__main__':
    main()

Submission status: Accepted

Solution code:
# ABC 094: A – Cats and Dogs
a, b, x = [int(s) for s in input().split()]
print('YES' if a <= x <= a + b else 'NO')

Submission status: Accepted

Solution code:
q,w,e = map(int,input().split())
print("YES" if q<=e<=q+w else "NO")

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

a,b,c = iim()

if a <= c <= a+b:
    print('YES')
else:
    (print('NO'))

Submission status: Accepted

Solution code:
A,B,X = map(int,input().split())

if A <= X <= A + B :
	print("YES")
else:
	print("NO")

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

    if a[0] <= a[2] and a[2] <=a[0] + a[1]:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
if a > x:
    print('NO')
elif a + b < x:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
if x<a:print('NO')
elif x>a+b:print('NO')
else:print('YES')

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())

if a > x:
    print('NO')
elif a + b < x:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
A,B,X= map(int,input().split())
if A+B<X:
    print('NO')
elif A>X:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
print('YES' if (A + B) > X and X >= A else 'NO')

Submission status: Accepted

Solution code:
A,B,X=map(int,input().split())
if X>=A and X<=A+B:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())

if a <= x <= a + b:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())

if x > a + b or x < a:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
A, B, X = map(int,input().split())

if A<=X and X<=(A+B):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
import math


a,b,c=map(int,input().split())

print("YES" if a<=c<=a+b else "NO" )

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, d=DVSR): return pow(x, d - 2, d)
def DIV(x, y, d=DVSR): return (x * INV(y, d)) % d
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())

A,B,X=LI()
print("YES" if X <= A+B and A <= X else "NO")

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
print("YES" if A <= X <= A+B else "NO" )

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
if A+B>=X>=A:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a,b,x = map(int, input().split())
if(a <= x and a+b >= x):
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
A,B,X=map(int,input().split());print("NYOE S"[(A+B>=X)*(A<=X)::2])

Submission status: Accepted

Solution code:
A,B,X = map(int,input().split())
if A+B >= X and A <= X:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a,b,x = map(int,input().split())
print ("YES") if a <= x and x <= a+b else print ("NO")

Submission status: Accepted

Solution code:
A,B,X=map(int,input().split())

print('NO' if X<A or X>A+B else 'YES')

Submission status: Accepted

Solution code:
a,b,c = map(int, input().split())
if a <= c and a + b >= c:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
r = X - A

if r <= B and r >= 0:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
A,B,X=map(int,input().split())

if X>=A and X<=A+B:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
def main():
    a, b, x = map(int, input().split())
    if x < a:
        ans = "NO"
    else:
        if (x - a) > b:
            ans = "NO"
        else:
            ans = "YES"
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def Cats_Dogs(a , b , x):

    return "YES" if a <= x <= a + b else "NO"

def main():
    a , b , x = map(int , input().split())
    print(Cats_Dogs(a , b , x))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())

ans = 'YES' if A <= X and X <= A + B else 'NO'
print(ans)

Submission status: Accepted

Solution code:
a,b,x = map(int,input().split())
if a>x:
  print('NO')
else:
  if a+b>=x:
  	print('YES')
  else:
    print('NO')

Submission status: Accepted

Solution code:
A,B,X = map(int, input().split())
L = A+B
if X>=A and X<=A+B:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
print("YES" if A <= X and X <= A+B else "NO")

Submission status: Accepted

Solution code:
a,b,x = map(int, input().split())

if x<a or a+b<x:
        print("NO")
else:
        print("YES")

Submission status: Accepted

Solution code:
l = [int(x) for x in input().split(' ')]
if l[0] <= l[2] and l[0] + l[1] >= l[2]:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
# | Its_Rashid | #
a , b , x = map(int , input() . split())
print('YES' if a <= x and a + b >= x else 'NO')

Submission status: Accepted

Solution code:
import sys
import os

OK = 'APPROVED'
NG = 'DENIED'


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B, X = list(map(int, sys.stdin.buffer.readline().split()))

    print('YES' if A <= X and X - A <= B else 'NO')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
if a <= x and x <= a+ b:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a,b,x = map(int,input().split())
print("YES") if a<=x and a+b >= x else print("NO")

Submission status: Accepted

Solution code:
A,B,X=map(int, input().split())
if A <= X <= A+B:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
print("YES" if x >= a and x <= a+b else"NO")

Submission status: Accepted

Solution code:
A,B,X=map(int,input().split())
if X>=A and A+B>=X:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
if(a+b>=x and a<=x):print("YES")
else: print("NO")

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())

if A <= X <= A+B:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a, b, x = [int(i) for i in input().split()]

print("NO" if x < a or x > a + b else "YES")

Submission status: Accepted

Solution code:
cats, animal, num = map(int,input().split())
if num > cats + animal:
  print("NO")
elif cats > num:
  print("NO")
else:
  print("YES")

Submission status: Accepted

Solution code:
a,b,x = map(int, input().split())
if a <= x and x <= a+b:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
if X>=A and X<=A+B:
  ans ='YES'
else:
  ans = "NO"
print(ans)

Submission status: Accepted

Solution code:
cat, cd, t = map(int, input().split())
f = False
if cat <= t and cd > 0 and cat + cd >= t:
     f = True
print("YES") if f else print("NO")

Submission status: Accepted

Solution code:
#abc094 a 
a,b,x=map(int,input().split())
if a<=x<=a+b:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
#pypyは内包表記使わない
def main():
    import sys
    #input = sys.stdin.readline
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations
    #from itertools import accumulate, product
    from bisect import bisect_left,bisect_right
    from math import floor, ceil
    #from operator import itemgetter

    #mod = 1000000007

    A, B, X = map(int, input().split())
    if A<=X<=A+B:
        print('YES')
    else:
        print('NO')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# Author: cr4zjh0bp
# Created: Thu Mar 12 07:49:01 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

A, B, X = na()

if A > X:
    print("NO")
elif A + B >= X:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
if a<=x and x<=a+b:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
print("YES" if ((c-a)>=0 and (a+b>=c)) else "NO")

Submission status: Accepted

Solution code:
a,b,x = map(int,input().split())

if a <= x <= a+b:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
if A <= C <= A + B:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a,b,x = map(int,input().split())
if b>=x-a and x-a>=0:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())

if x >= a and x <= a + b:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
if x < a + b and x >= a:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
# A - Cats and Dogs
a,b,x=list(map(int,input().split()))
if a>x:
    print("NO")
elif (x-a)<=b:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
x=list(map(int, input().split()))
if x[0]+x[1]>=x[2] and x[0]<=x[2]:
	print('YES')
else:
	print('NO')

Submission status: Accepted

Solution code:
A,B,X = map(int,input().split())
if X <= A+B and A<=X:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
print("YES" if a <= c and a+b >= c else "NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
n = 'YES'
if a > x:
  n = 'NO'
elif a+b < x:
  n = 'NO'
print(n)

Submission status: Accepted

Solution code:
A,B,X = map(int,input().split())
print('YES' if A <= X <= A+B else 'NO')

Submission status: Accepted

Solution code:
a,b,x = [int(x) for x in input().split()]

# a + b = x
# x - a = b

if (x - a) >= 0 and (x - a) <= b:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
if a<=x and a+b>=x :
  print("YES")
else : 
  print("NO")

Submission status: Accepted

Solution code:
l1 = input().split()
a = int(l1[0])
b = int(l1[1])
x = int(l1[2])
if x == a:
    print("YES")
for i in range(1,b+1):
    if x == a+i:
        print("YES")
        exit()
if x < a or (x > (a+b)):
    print("NO")

Submission status: Accepted

Solution code:
A,B,X=map(int,input().split())
print("YES" if A<=X and X<=A+B else"NO")

Submission status: Accepted

Solution code:
A,B,X=map(int,input().split(' '))
if A<=X<=A+B:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
A,B,X=map(int,input().split())
if A<=X and A+B>=X:
	print("YES")
else:
	print("NO")

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
print("YES" if a <= c <= a+b else "NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
if a>x:
    print("NO")
else:
    if a+b<x:
        print("NO")
    else:
        print("YES")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())

if 0 <= x - a <= b:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a,b,x = map(int,input().split())
if a > x:
  print("NO")
elif a + b >= x:
  print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
if x-a>=0 and x-a<=b:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())

if a <= x and x - a <= b:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a,b,x = map(int,input().split())

if 0<= x-a <= b:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a, b, x = [int(i) for i in input().split()]

print("YES" if a <= x and a+b >= x else "NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())


print("YES" if a <= x <= a + b else "NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
if a <= x and x <= a + b:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
#094_A
a,b,x=map(int,input().split())
print('YES' if a<=x<=a+b else 'NO')

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
if a <= c <= a+b:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())

need = X - A

if need >= 0:
    if need <= B:
        print('YES')
    else:
        print('NO')
else:
    print('NO')

Submission status: Accepted

Solution code:
A, B, X=map(int, input().split())
print('YES') if A<=X and A+B>=X else print('NO')

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())

if (a + b) >= x >= a:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

A,B,X = [int(i) for i in input().rstrip().split()]

if (X>=A) and (X-A)<=B:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
if x<a or x-a>b:
  print("NO")
else:
  print("YES")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
if a <= x <= (a+b):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a, b, x = [int(_) for _ in input().split()]
print('YES' if a <= x <= a + b else 'NO')

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
if a <= x and x <= a + b:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
if a+b<x or a>x:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())

if A <= X <= (A + B):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
A,B,X=map(int,input().split())
if A>X:
  print('NO')
elif A+B<X:
  print('NO')
else:
  print('YES')

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())

if x < a:
    print('NO')
elif x-a <= b:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a,b,x=list(map(int,input().split()))
if a+b >= x and a <= x:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
A,B,X=map(int,input().split())
if A<=X<A+B:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
print("YES" if a<=x and x<=a+b else "NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, raw_input().split())
if x >= a and a + b >= x:
    print 'YES'
else:
    print 'NO'

Submission status: Accepted

Solution code:
a,b,x=map(int,raw_input().split())
if a<=x and x<=b+a:
  print "YES"
else:
  print "NO"

Submission status: Accepted

Solution code:
a,b,x = map(int,input().split())
if a+b >= x and a <=x:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A,B,X=map(int,input().split())
if A<=X<=A+B:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())

if (X >= A and X <= A + B):
	print("YES")
else:
	print("NO")

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
if x>=a and x<=a+b:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A,B,X = map(int, input().split())
if A > X:
    print('NO')
elif A + B < X:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())

if B >= X - A and X >= A:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
print("YES" if A <= X <= A + B else "NO")

Submission status: Accepted

Solution code:
a, b, c  =map(int, input().split())
if a + b >= c and a <= c:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())

if A <= X <= A + B:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
if 0 <= x - a <= b:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
import math
import itertools
#n = int(input())
#n, d = list(input().split())
A, B, X= list(map(int, input().split()))

if A == X or (A < X and A+B > X) :
    print("YES")
else:
    print("NO")