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: Wrong Answer

Solution code:
a = input().split()
print("YES" if (int(a[0]) <= int(a[2]) <= (int(a[0]) + int(a[1]))) else "No")

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
da = list(map(int,input().split()))
if 0 >= (da[2] - da[1] -da[0]):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
A,B,X = map(int, input().split())

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

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    A, B, X = map(int, input().split())

    if A <= X and X <= A + B:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input_ = input().split(" ")

a = input_[0]
b = input_[1]
c = input_[2]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if A > X:
    print("No")
elif X - A <= B:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
if __name__ == "__main__":
    A, B, X = list(map(int, (input().split(' '))))
    buf = X - A
    if buf < 0:
        print('No')
        sys.exit()
    if buf <= B:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, x = list(map(int, input().split()))
ans=0
if a+b>=x:
    if a<=x:
        ans+=1
if ans==0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if 0<=X-A and X-A<=B:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
if a[0] <= a[2] <= a[0] + a[1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Accepted

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

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,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())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
cat,b,x=map(int,input().split())
if cat<=x and x<=cat+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 = [int(x) for x in input().split()]
res = "YES"
if a > c:
  res = "NO"
if a + b < c:
  res = "NO"
print(res)

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())

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

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 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+b >= x and a <= x else "NO")

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
A,B,X=list(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,c=map(int,input().split(" "))
print("YES") if a<=c and a+b>=c else print("NO")

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=input().split(' ')
A=int(a[0])
B=int(a[1])
X=int(a[2])
if A<=X and A+B>=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 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:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
if a>x 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 = 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())
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 X >= A and B >= (X-A):
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

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())
print("YES" if a<=x<=a+b else "NO")

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:
cat_num, unknown_animals, question_num_cat = map(int, input().split())

if cat_num <= question_num_cat <= cat_num + unknown_animals:
    print('YES')
else:
    print('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:
#ABC094A
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 or A > X:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
def main():
    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:
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())
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:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    A, B, X = map(int, readline().split())

    if A <= 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 0 <= X - A <= B:
    print('YES')
else:
    print('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:
import sys

input = sys.stdin.readline


def main():
    A, B, X = map(int, input().split())
    if A > X:
        print('NO')
    else:
        if B >= X - A:
            print('YES')
        else:
            print('NO')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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


if x<=c:
    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>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 and a <= 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 + b < x:
  print("NO")
else:
  print("YES")

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())
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 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:
def resolve():
    a, b, x = map(int, input().split())
    ans = ""
    if a <= x and x <= a+b:
        ans = "YES"
    else:
        ans = "NO"
    print(ans)
resolve()

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 + 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 A + B >= X:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b, x = list(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())
print("YES" if A <= X and A + B >= X else "NO")

Submission status: Accepted

Solution code:
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
if a+b>=c:
  if a<=c:
    print("YES")
  else:
    print("NO")
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:
# coding: utf-8
import math

cat, meta, x = map(int, input().split())

if cat > x or cat + meta < x:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
x,y,z=map(int,input().split())
if(x<=z and x+y>=z):
    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())
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 :
    print("NO")

elif 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:
#!/usr/bin/env python3

a, b, x = list(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:
    print('NO')
else:
    if 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+B>=X:
    if X<A :
        print('NO')
    else :
        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 a == x or (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 <= a + b else 'NO')

Submission status: Accepted

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

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 <= a + b else "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 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:
    print("NO")
if A<=X:
    if (A +B)<X:
        print("NO")
    else:
        print("YES")

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
if a <= c and c <= 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,c = map(int, input().split())
if a > c:
  print("NO")
elif c-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()

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

Submission status: Accepted

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

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,c=map(int,input().split())
print('YES' if a+b>=c and a<=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, 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());print('NYOE S'[a<=x<=a+b::2])

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [list(input()) for _ in range(n)]
#a = [int(input()) for _ in range(n)]

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

if ( 0 <= (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 A+B>=X 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 X>=A and A+B>=X:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

    result = False
    for i in range(0, b+1):
        if a + i == x:
            result = True
            break
    
    if result:
        print('YES')
    else:
        print('NO')


if __name__ == "__main__":
    main()

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:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    A, B, X = map(int, readline().split())

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

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
print('YNEOS'[x<a or x>a+b::2])

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    A, B, X = map(int, readline().split())
    if A<=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 <= X <= A+B:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

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 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 > 0:
    if a + b >= x:
        print('YES')
    else:
        print('NO')
elif 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())
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())
print("YES" if a<=x<=a+b else "NO")

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
if a>x:
  print('NO')
  exit()
if x-a<=b:
  print('YES')
  exit()
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 = list(map(int, input().split()))
if a <= c <= a + b:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
## Library
 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools
import copy
 
## input
 
# N=int(input())
# A,B,C,D=map(int, input().split())
# S = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]
#    S = []
#    for _ in range(N):
#        S.append(list(input()))
 
A,B,X=map(int, input().split())

if A>X:
    print("NO")
    sys.exit()

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

Submission status: Accepted

Solution code:
determin, prob, X = map(int, input().split())

if (determin <= X and X <= determin + prob):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
# input()
# int(input())
# map(int, input().split())
# list(map(int, input().split()))
# list(map(int, list(input()))) # スペースがない数字リストを読み込み
import math
import fractions
import sys
import bisect
import heapq  # 優先度付きキュー(最小値取り出し)
import collections
from collections import Counter
from collections import deque
import pprint
import itertools

sr = lambda: input()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    if n == 1:
        return arr

    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


# a^n
def power(a, n, mod):
    x = 1
    while n:
        if n & 1:
            x *= a % mod
        n >>= 1
        a *= a % mod
    return x % mod


# n*(n-1)*...*(l+1)*l
def kaijo(n, l, mod):
    if n == 0:
        return 1
    a = n
    tmp = n - 1
    while (tmp >= l):
        a = a * tmp % mod
        tmp -= 1
    return a

# Union Find
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

# 約数生成
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors


inf = 10 ** 18
mod = 10 ** 9 + 7

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

Submission status: Accepted

Solution code:
# # Make IO faster
# import sys
# input = sys.stdin.readline

# # get single (or) multiple str
# X = input()

# # get single int
# N = int(input())
# # get multiple int (e.g., 2)
# X, Y = map(int, input().split())
# # get multiple int (e.g., 2) for N lines
# XY = [list(map(int, input().split())) for _ in range(N)]

# from IPython import embed; embed(); exit();

# 全部入り
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B, X = MAP()
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 "NO")

Submission status: Accepted

Solution code:
a,b,x=[int(i) for i 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())
print('YES' if A <= X <= A+B else 'NO')

Submission status: Accepted

Solution code:
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

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

Submission status: Accepted

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

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