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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
if (C <= A+B) & (C >=A):
    print ("YES")

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

Submission status: Accepted

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

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 = [int(i) for i in 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 = list(map(int, input().split()))

min_count = A
max_count = A + B

if X < min_count or X > max_count:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
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 (A <= X) and (X <= A+B):
  res = "YES"
else:
  res = "NO"

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
A - Cats and Dogs
https://beta.atcoder.jp/contests/abc094/tasks/abc094_a

"""
import sys
from sys import stdin
input = stdin.readline


def main(args):
    ans = 'YES'
    A, B, X = map(int, input().split())
    if A > X:
        ans = 'NO'
    if A + B < X:
        ans = 'NO'
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:


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

    if A > X or 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, raw_input().split())
print "YES" if (A <= X <= A+B) else "NO"

Submission status: Accepted

Solution code:
a, b, x = [int(i) for i in input().split()]
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=map(int,input().split())
print('YES'if a<=x<=a+b 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')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding: utf-8

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#abc094a

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

Submission status: Accepted

Solution code:
# coding=utf-8
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
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=[int(x) for x in input().split()]
if x < a:
    print('NO')
elif a + b > x + 1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# A,B,Xを取得
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=list(map(int,input().split()))
if B>=X-A&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 > x):
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
l = list(int(i) for i in input().split())

if l[2] < l[0]:
    print("NO")
elif l[2] == l[0]:
    print("YES")
else:
    if l[2] - l[0] <= l[1]:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

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

abx = [int(x) for x in abx]

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

Submission status: Accepted

Solution code:
s = input().split()
if int(s[2])>int(s[0])+int(s[1]):
    print('NO')
elif int(s[2]) < int(s[0]):
    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"*(A<=X<=A+B)or"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())

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

Submission status: Accepted

Solution code:
a,b,x = map(int, input().strip().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:
import sys

l=input().split()
A=int(l[0])
B=int(l[1])
X=int(l[2])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def judge(a, b, x):
	if 0 <= x-a and x-a <= b: return 'YES'
	else: return 'NO'

inpt = map(int, raw_input().split())

print judge(inpt[0], inpt[1], inpt[2])

Submission status: Accepted

Solution code:
a, b, x = map(lambda anm: int(anm),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:
# coding: utf-8
# Your code here!
a,b,x = list(map(int,raw_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 0 <= c-a <= b:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
if __name__ == "__main__":
    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+B>=X and not A>X :
	print ('YES')
else:
	print ('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
print(["YES","NO"][c-a<0 or c-a>b])

Submission status: Accepted

Solution code:
#coding: utf-8                          
                                        
ABX = [int(i) for i in input().split()] 
A, B, X = ABX[0],  ABX[1],  ABX[2]      
                                        
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 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:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    a,b,x = LI()
    if a > x or a+b < x:
        return 'NO'


    return 'YES'


print(main())

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import sys

def getinputdata():

    # 配列初期化
    array_result = []    
    data = input()
    array_result.append(data.split(" "))

    flg = True

    try:
        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = True

            else:

                flg = False
    finally:

        return array_result

arr_data = getinputdata()

#cat
a = int(arr_data[0][0])
b = int(arr_data[0][1])
x = int(arr_data[0][2])


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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B, X = map(int, input().split())
if X - A in range(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:
# -*- coding: utf-8 -*-

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


X = X - A

if X >= 0 and X <= 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())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

else:
    print('NO')

Submission status: Accepted

Solution code:
abx = list(map(int,input().split()))
a = abx[0]
b = abx[1]
x = abx[2]
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 and a+b>=x:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding : utf-8

import numpy as np

A = [int(i) for i in 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, 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())
print("YES") if a + b >= x and a <= x else print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
c=a[2]-a[0]
if c<0:
   # print('c1=',c)
    print("NO")
else:
    if c<=a[1]:
        #print('c=',c)
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
inputs = list(map(int,input().split(" ")))
a = inputs[0]
b = inputs[1]
c = inputs[2]
 
if a + b >= c and a <= c:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
list=input().rstrip().split()

A = int(list[0])
B = int(list[1])
X = int(list[2])

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

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

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

Submission status: Accepted

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

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

    if (X-A)<0:
        flag = False
    elif (X-A)<B:
        flag = True

    if flag == True:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A = input().split()
A = [ int(x) for x in A]

if A[0] <= A[2]:
    if A[1] + A[0] < A[2]:
        print("NO")
    else:
        print("YES")
elif A[0] > A[2]:
    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())

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

Submission status: Accepted

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

# 入力を各変数に格納
cat_num, both_num, sum_num = map(int, input().split())

if cat_num + both_num < sum_num or cat_num > sum_num:
	print("NO")
else:
	print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    A, B, X = (int(i) for i in input().split())
    if A > X or (A+B-X) <= 0:
        print('NO')
    else:
        print('YES')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,X = map(int,input().split(" "))
judge = True
for i in range(B):
    temp = A+i
    if temp == X:
        print("YES")
        judge =False
if judge:
    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())
c = x - a
if c < 0:
    print("NO")
elif (a+b) < x:
    print("NO")
elif 0 <= c <= b:
    print("YES")

Submission status: Accepted

Solution code:
A, B, X=list(map(int,input().strip().split(' ')))
result=False
if A <= X and X <= A + B:
    result = True

if result:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
cat, cat_dog, cat_num = [int(x) for x in input().split()]
hoge = cat_num - cat
if hoge < 0 or hoge - cat_dog > 0:
  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:
cat, cat_plus_dog, X_cat = map(int, input().split())
if cat > X_cat:
    print('NO')
elif cat + cat_plus_dog < X_cat:
    print('NO')
elif cat > X_cat:
    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())
if (X>=A and X<=A+B):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a,b,x = map(int, raw_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 >= 0 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())
cnt = 0
for i in range(B+1):
    if A+i == X:
        cnt += 1
if cnt>0:
    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:
def main():
	A,B,X = map(int,input().split())

	x_a = X-A

	if x_a<0:
		return "NO"

	if B>=x_a:
		return "YES"
	else:
		return "NO"

print(main())

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
C = list(int(i) for i in input().split())
if C[2] - C[0] >= 0:
    if C[2] - C[0] <= C[1]:
        print("YES")
    else:
        print("NO")
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("NO")
elif 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:
#coding:utf-8

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

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

Submission status: Accepted

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


print(m())

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

main()

Submission status: Accepted

Solution code:
a, b, c = input().strip().split(' ')
a, b, c = [int(a), int(b), int(c)]

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

Submission status: Accepted

Solution code:

a, b, x = map(int, input().split())
if a == x:
    print('YES')

elif a > x:
    print('NO')

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

    else:
        print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

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