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.
def main():
    a, b, x = map(int, input().split())
    if a + b >= x:
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    main()

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

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


if __name__ == "__main__":
    main()
