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

Submission status: Accepted

Solution code:
num = input().split()

a, b, x = int(num[0]), int(num[1]), int(num[2])

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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());print(" YNEOS"[a<=x<=a+b::2])

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

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

for i in range(b):
    if a+i == x:
        print('YES')
        break
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())
print("YES") if A + B >= X >= A 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 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 b>x-a:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
def main():
    A, B, X = map(int, input().split())
    if A <= X <= A+B:
        return "YES"
    return "NO"
if __name__ == '__main__':
    print(main())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, x = list(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())
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 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 x < a or x > a + b:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
A, B, X = [int(x) for x in input().split()]
print('YNEOS'[1-(A<=X<=A+B-1)::2])

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 or x - a > b:
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    test()

Submission status: Accepted

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

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 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   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 a + b >= x else "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:
def main():
    A, B, X = map(int ,input().split())

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

main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:

a, b, x = map(int, input().split())
if x < a:
    print('NO')
else:
    print('YES' if x-a <= b 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 a+b >= x and x >= a :
  print("YES")
  
else:
  print("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:
    print("NO")
elif 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-1:
    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:
#94

A, B, X = map(int, input().rstrip().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#ABC095
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 c - a >= 0 and c - a <= b:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, C = map(int, input().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 X >= A and 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())

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

Submission status: Accepted

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

else:
  print('NO')

Submission status: Accepted

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

res = False

for inu in range(0, a + b + 1):
    if x + inu != a + b:
        continue
    neko = a + b - inu
    if neko == x and neko >= a:
        res = True

print("YES" if res 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=list(map(int,input().split()))
if a[0]<=a[2] and a[0]+a[1]>=a[2]:
    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 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 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,c = map(int,input().split())
if c>= a:
  if c-a<=b:
    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:
A,B,X = map(int,input().split())

if A > X:
    print('NO')
    exit()
if A + B < X:
    print('NO')
    exit()
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())
print(["NO","YES"][0<=x-a<=b])

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A,B,X = [int(i) for i in 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 or x > a+b:
    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, 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 A+B >=X and A <= X:
  print ('YES')
else:
  print ('NO')

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-

# input
A, B, X = map(int, input().split())

# solve
ans = 'YES' if A <= X and (X - A) <= B else 'NO'

# output
print(ans)

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007

#A
def A():
    a, b, x = LI()
    if a <= x <= a + b:
        print("YES")
    else:
        print("NO")
    return

#B
def B():
    return

#C
def C():
    n = II()
    x = LI()
    xb = x[::1]
    xb.sort()
    a = xb[n // 2 - 1]
    b = xb[n // 2]
    for i in range(n):
        if x[i] <= a:
            print(b)
        elif x[i] >= b:
            print(a)
        
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

# print(A)
# print(B)
# print(X)

# print((A < X) and (A + B >= X))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import numpy as np
import statistics
from statistics import mean, median,variance,stdev
import math

def main():
	A, B, X = map(int, input().split(" "))
	
	if A+B >= X:
		if A <= X:
			print("YES")
		else:
			print("NO")
	else:
		print("NO")
	
if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
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:
#!/usr/bin/env python3
#ABC94 A

a,b,x = map(int,input().split())
if a > x:
    print('NO')
elif b >= x-a:
    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 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())

# 猫の絶対数 => a
# 犬の絶対数 => d = b-x
# いてほしい猫の数 => x
# 不明な犬猫の数 => b-a

# いるべき総数よりも猫が多い　またはいてほしい猫の数よりも現在の猫の数のほうが多い
if a+b < x or x-a < 0:
  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 = list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    a, b, x = map(int, input().split())

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

Submission status: Accepted

Solution code:
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    a, b, x = map(int, input().split())

    is_possible = False
    if a > x:
        print("NO")
    elif b >= x - a:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

YES = "YES"  # type: str
NO = "NO"  # type: str

def solve(A: int, B: int, X: int):
    print(YES) if(A <= X <= A+B) else print(NO)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    X = int(next(tokens))  # type: int
    solve(A, B, X)

if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    A,B,X = (int(_) for _ in input().split())
    if X<A:
        print('NO')
    elif A+B<X:
        print('NO')
    else:
        print('YES')
    
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 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())

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

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

A, B, X = nl()

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

Submission status: Accepted

Solution code:
s = list(map(int,input().split()))

a = s[0]
b = s[1]
x = s[2]
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('NO' if A+B < X or A > X else '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,c=map(int,input().split())
if a>c or (a+b)<c:
  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(abx) for abx 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 <= 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 or a + b < x:
  print('NO')
else:
  print('YES')

Submission status: Accepted

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


abc()

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:
a, b, x = map(int, input().split())

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

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:
# 2019/06/09
# AtCoder Beginner Contest 094 - A

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

if a > x:
    ans = "NO"
elif a + b < x:
    ans = "NO"
else:
    ans = "YES"

# Output
print(ans)

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:
# -*- coding: utf-8 -*-

def solve():
    a, b, x = map(int, input().split(' '))
    if a<= x <= a+b:
        return 'YES'
    return 'NO'

print(solve())

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(x) for x in 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 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 or 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')
else:
  if X-A<=B:
    print('YES')
  else:
    print('NO')

Submission status: Accepted

Solution code:
list = input().split()
A = int(list[0])
B = int(list[1])
X = int(list[2])

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


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