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

Submission status: Accepted

Solution code:
def readints():
    return list(map(int, input().split()))


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

Submission status: Accepted

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

Submission status: Accepted

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

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 x<=(a+b) and 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","NO"][a+b<x or x<a])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,x = map(int, input().split())
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('YES') if X in range(A,A+B+1) 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())
s = x-a
if 0<=s and s<=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:
# 入力 : 数字3つ
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 :
  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())
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 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 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:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

def main():
    a,b,x= inpm()
    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())

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

print(ans)

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:
#!/usr/bin/env python3
from itertools import product, permutations, combinations
from bisect import bisect_right,bisect_left
INF = float('inf')
A,B,X=map(int, input().split())
if A > X:
    print('NO')
elif X-A <= B:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
 
flag=False
for i in range(0,b+1):
    if a+i==x:
        flag = True
        break
 
if flag:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,x = map(int, input().split())
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:
    print("NO")
    exit()
    
if (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:
# import numpy as np
# import scipy as sp
# print(a,b,c,sep="") # 半角スペースなしで出力(abc)
# n=int(input())  #数値入力 「N」だけの入力のとき
# a,b=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
# c=list(map(int, input().split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき
# s=[list(map(str,list(input()))) for i in range(h)]  # 文字列の二次元配列入力
# s = [list(map(int, input().split())) for i in range(n)] # 数値の二次元配列入力
# a = b[:], a = [x[:] for x in b] # deepcopy
# chr(ord('a') + 1) # chrのインクリメント
# s.sort(key=lambda x: x[1], reverse=False) # 2番目の要素で昇順にソート（Trueなら降順）
#

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
arr = input().split()
arr = list(map(int, arr))
a = arr[0]
b = arr[1]
x = arr[2]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
a,b,x = map(int,input().split())
print("YES" if a <= x <= a+b else "NO")

Submission status: Accepted

Solution code:
cat, animal, just = map(int, input().split())
print("YES" if 0<=just-cat<=animal else "NO")

Submission status: Accepted

Solution code:
cat, animal, just = map(int, input().split())
print("YES" if cat<=just<=cat+animal else "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:
cat_num, animal_num, just = map(int, input().split())
print("YES" if just>=cat_num and just<=cat_num+animal_num else "NO")

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 24, Jan, 2020
"""

import sys

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

A, B, C = map(int, readline().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
#N = int(input())
#S = str(input())
A, B, X = map(int, input().split())

if X < A :
  print ("NO")
  exit()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    from sys import stdin, setrecursionlimit
    setrecursionlimit(10**6)
    r = stdin.readline()[:-1]
    #n = int(stdin.readline()[:-1])   
    #r = [stdin.readline() for i in range(n)]
    #t = [int(stdin.readline()) for i in range(n)]

    res = 0
    a, b, c = map(int, r.split())
    if a+b < c or a > c:
        print('NO')
    else:
        print('YES')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
print("YNEOS"[not (A<=X<=A+B)::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
if abs(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:
import math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def my_round(a,dig=0):
    p = 10 ** dig
    return (a * p * 2 + 1) // 2 / p

def gcd(a,b): #最大公約数
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def lcm(a,b): #最小公倍数
    return a/gcd(a,b)*b

def divisors(a): # 約数列挙
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): #素数判定
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): #素数列挙
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def prime_fact(a): #素因数分解
    sqrt = math.sqrt(a)
    res = []
    i = 2
    if is_prime(a):
        res.append(a)
    else:
        while a!=1:
            while a%i==0:
                res.append(i)
                a //= i
            i += 1
    return res

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

if __name__=='__main__':
    main()

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

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

Submission status: Accepted

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

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

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:
num = input().split()
num_i = [int(s) for s in num]

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
A,B,X = [int(i) for i in input().split()]
if B >= X - A and X - A >= 0:
    print("YES")
else :
    print("NO")

Submission status: Accepted

Solution code:
a, b, x = (int(i) for i in 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 b<x-a or a>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 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("YES" if a<=x and a+b>=x else "NO")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
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
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())
if a > x:
    print('NO')
elif b >= x - a:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
print("YES" if not(A > X) and B >= (X-A) 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(lambda x: int(x), input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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:
import sys
A,B,X = map(int, input().split())

for b in range(B+1):
    if X==A+b:
        print("YES")
        sys.exit()

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:
li = list(map(int,input().split()))

if li[0]<=li[2] and li[0]+li[1]>=li[2]:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
import sys

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

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

if __name__ == '__main__':
    ans = main()
    print(ans)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(ans)

"""
3 5 4

YES

2 2 6

NO

5 3 2

NO
"""

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

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

Submission status: Accepted

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

Submission status: Accepted

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


# Generated by 1.1.6 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:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b,c,=INTM()
    if a<=c and c<=a+b:
        print('YES')
    else:
        print('NO')
if __name__ == '__main__':
    do()

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