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

import sys
# import time
# import math
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)



def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1             # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    a, b, x = mi()
    print('YES') if a <= x <= a + b else print('NO')


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, x = [int(s) for s 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 x>=a and x<=a+b:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A, B, X = map(int, input().split())
print(['NO', 'YES'][A <= X and (A + B) >= X])

Submission status: Accepted

Solution code:
def resolve():
	a, b, x = map(int, input().split())
	if a <= x and (a + b) >= x:
		print('YES')
	else:
		print('NO')
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 <= 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<=B and A<=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:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

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

#a to 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())

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

Submission status: Accepted

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    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

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#############
# Main Code #
#############

A,B,X = inputIL()

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

Submission status: Accepted

Solution code:
a, b, x = map(int, input().split())
print('YES' if b >= x-a >= 0 else '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:
import sys
import math
import bisect

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

if __name__ == "__main__":
    main()

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:
# -*- coding: utf-8 -*-
"""
Created on Mon May 11 16:27:28 2020

@author: shinba
"""


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:
def YN(P):
    if P:
        print("YES")
    else:
        print("NO")

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

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

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


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


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools
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
    print(solve(A, B, X))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    #test()
    main()

Submission status: Accepted

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

if __name__ == '__main__':

    ABC_94_A()

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# region header
import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi
# endregion
A, B, X = ri_()
print('YES' if A <= X <= A + B else 'NO')

Submission status: Accepted

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

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

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

Submission status: Accepted

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

def main():
    if A + B < X or A > 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 and 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 "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())

print("YES" if x - a <= b and x >= a else "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:
#!/usr/bin/env python3

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 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 <= (a+b) else 'NO')

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop

import collections

a,b,x = map(int,input().split())
ab = a+b
if x>=a and x<=ab:
    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())
ab=a+b
if a<=x<=ab:
  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())
print('YNEOS'[a>x or b<x-a::2])

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

Submission status: Accepted

Solution code:
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, groupby
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
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()
print("YES" if A <= X <= A+B else "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 <= B 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:
import sys
input = sys.stdin.readline
ma = lambda : map(int,input().split())
ni = lambda : int(input())
a,b,x = ma()

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

Submission status: Accepted

Solution code:
a,b,x=[int(i) for i in 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())
T = A+B

if A <= X and X <= T:
    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:
#!/usr/bin/env python3

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

def main():
    A,B,X=map(int,input().split())
    YESNO(A<=X<=A+B)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

def main():
    a, b, x = nm()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

    if a + b < x:
        print('NO')
        exit()

    if a > x:
        print('NO')
        exit()

    print('YES')


if __name__ == '__main__':
    main()

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("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 <= 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:
  print("NO")
  exit()
elif 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())
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("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 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:
    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 and a <= x and b >= x-a:
    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,c = list(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())

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

Submission status: Accepted

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

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:
ints = list(map(int, input().split()))
A = ints[0]
B = ints[1]
X = ints[2]
if A > X or A+B < X:
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))

def main():
    a, b, x = MII()
    if x < a: print('NO')
    elif 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 >= 0:
  print('YES')
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:
a,b,x=map(int,input().split())
print('YES' if a+b>=x and a<=x else 'NO')

Submission status: Accepted

Solution code:

url = "https://atcoder.jp//contests/abc094/tasks/abc094_a"

def main():
    t = list(map(int, input().split()))
    for i in range(t[1]):
        tmp = i + t[0]
        if tmp == t[2]:
            print('YES')
            exit()
    print('NO')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    t = list(map(int, input().split()))
    for i in range(t[1]):
        tmp = i + t[0]
        if tmp == t[2]:
            print('YES')
            exit()
    print('NO')

if __name__ == '__main__':
    main()

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, 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())
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:
def resolve():
    A, B, X = list(map(int, input().split(" ")))
    if X >= A:
        print("YES" if B >= X - A else "NO")
    else:
        print("NO")

if '__main__' == __name__:
    resolve()

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