Harryxun/stf_run huggingface dataset:
n, a, b, c, d = map(int, input().split())
s = list(input())

# 岩が2個並ぶ
before = s[0]
for ss in s[1:]:
    if ss == before and ss == '#':
        print('No')
        exit()
    before = ss

# 追い越す場合
if c > d:
    # new_s = s[:d+1]
    # for i in range(b - 1, len(new_s) - 2):
    #     ss = new_s[i:i + 3]
    #     # print(ss)
    #     if len(set(ss)) == 1 and ss[0] == '.':
    #         print('Yes')
    #         exit()
    ok = False
    for i in range(b, d + 1):
        if s[i - 1] == '.' and s[i] == '.' and s[i + 1] == '.':
            ok = True
            break
    if not ok:
        print('No')
        exit()

# 追い越さない
print('Yes')


### FIXED CODE ###

def iwa_check(start, end):
    for i in range(start, end):
        if s[i] == '#' and s[i + 1] == '#':
            return False
    return True


n, a, b, c, d = map(int, input().split())
s = list(input())
s = ['#'] + s + ['#']

# 岩が2個並ぶ
if not iwa_check(a, c) or not iwa_check(b, d):
    print('No')
    exit()

# 追い越す場合
if c > d:
    ok = False
    for i in range(b, d + 1):
        if s[i - 1] == '.' and s[i] == '.' and s[i + 1] == '.':
            ok = True
            break
    if not ok:
        print('No')
        exit()

# 追い越さない
print('Yes')
text = str(input())
if text ==  a 
    print(vowel)
elif text ==  i
    print(vowel)
elif text ==  u 
    print(vowel)
elif text ==  e :
    print(vowel)
elif text == o ::
    print=(vowel)
else:
    print=(consonant)

### FIXED CODE ###

s=input()
if s == "a" or s == "i" or s == "u" or s =="e" or s == "o":
    print("vowel")
else:
    print("consonant")
n, k = map(int,input().split())
s = list(input())
if s[k] == "A":
    s[k] = "a"
    print("".join(s))
elif s[k] == "B":
    s[k] = "b"
    print("".join(s))
else:
    s[k] = "c"
    print("".join(s))

### FIXED CODE ###

n, k = map(int,input().split())
s = list(input())
if s[k-1] == "A":
    s[k-1] = "a"
    print("".join(s))
elif s[k-1] == "B":
    s[k-1] = "b"
    print("".join(s))
else:
    s[k-1] = "c"
    print("".join(s))
N, X, M = map(int, input().split())

if X == 0:
    print(0)
    exit()
    
if N == 1:
    print(X)
    exit()

d = [-1] * (M + 1)
out = [0]
a = X
ans = 0
for i in range(1, N + 1):
    ans += a
    d[a] = i
    out.append(a)
    a = a ** 2 % M
    if d[a] != -1:
        loop_num = i + 1 - d[a]
        remain = N - i
        break
ans += sum(out[d[a]:d[a] + loop_num]) * (remain // loop_num)
ans += sum(out[d[a]:d[a] + (remain % loop_num)])

print(ans)


### FIXED CODE ###

N, X, M = map(int, input().split())

if X == 0:
    print(0)
    exit()

if N == 1:
    print(X)
    exit()

d = [-1] * (M + 1)
out = [0]
a = X
ans = 0
for i in range(1, N + 1):
    ans += a
    d[a] = i
    out.append(a)
    a = a ** 2 % M
    if a == 0:
        print(ans)
        exit()

    if d[a] != -1:
        loop_num = i + 1 - d[a]
        remain = N - i
        ans += sum(out[d[a]:d[a] + loop_num]) * (remain // loop_num)
        ans += sum(out[d[a]:d[a] + (remain % loop_num)])
        break
print(ans)
n=int(input())
a=list(map(int,input().split()))
l=[0]*n

for i in a:
  l[i]+=1
print(l[1])
for i in a:
  print(l[i+1])


### FIXED CODE ###

import collections
n=int(input())
a=list(map(int,input().split()))
m=max(a)
c=collections.Counter(a)
c=c.most_common()
l=[0]*n
for i in range(len(c)):
    l[c[i][0]-1]=c[i][1]
print(l[0])
for j in range(1,n):
    print(l[j])
N=int(input())
data=list(map(int,input().split()))

for i in range(N):
    mod2=data[i]%2
    mod6=data[i]%6
    mod10=data[i]%10
    if mod2==0:
        if mod6==0 or mod10==0:
            ans="APPROVED"
            continue
        else:
            ans="DENIED"
            break
    else:
        continue
print(ans)

### FIXED CODE ###

N=int(input())
data=list(map(int,input().split()))
ans="APPROVED"
for i in range(N):
    mo2=data[i]%2
    mo6=data[i]%6
    mo10=data[i]%10
    if mo2==0:
        if mo6==0 or mo10==0:
            ans="APPROVED"

        else:
            ans="DENIED"
            break
    else:
        continue
print(ans)
a.b=map(int,input().split())
if a==1:
   print('Alice')
   exit()
if b==1:
   print('Bob')
   exit()
if a==1 and b==1:
   print('Draw')
   exit()
if a<b:
   print('Bob')
   exit()
if a>b:
   print('Alice')
   exit()
if a==b:
   print('Draw')
    exit()
   

### FIXED CODE ###

import math
import string
import collections
from collections import Counter
from collections import deque


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


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
ab = readints()
if ab[0] == 1 and ab[1] == 1:
    print('Draw')
    exit()
if ab[0] == 1:
    print('Alice')
    exit()
if ab[1] == 1:
    print('Bob')
    exit()
if ab[0] < ab[1]:
    print('Bob')
    exit()
if ab[0] > ab[1]:
    print('Alice')
    exit()
if ab[0] == ab[1]:
    print('Draw')
#t = list(map(str, input()))
# print(t)
#p_cnt = 0
#d_cnt = 0
# for i in range(len(t)):
#    if t[i] == 'P':
#        p_cnt += 1
#    if t[i] == 'D':
#        d_cnt += 1
# if p_cnt > d_cnt:
#    for i in range(len(t)):
#        if t[i] == '?':
#            if t[i-1] == 'P':
#                t[i] = 'D'
#            if t[i-1] == 'D':
#                t[i] = 'P'
#    tt = ''.join(t)
#    print(tt)
# else:
#    for i in range(len(t)):
#        if t[i] == '?':
#            t[i] = 'D'
#    tt = ''.join(t)
#    print(tt)
#
a, b, c, d, e, k= map(int, input().split())
if e - a > k:
    print(':(')
else:
    print('Yey!')

### FIXED CODE ###


a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e-a > k:
  print(":(")
else:
  print("Yay!")
a=input()
b=input()
if (a*b)%2 ==0:
  print('Even')
else:
  print('Odd')

### FIXED CODE ###

a,b=map(int,input().split())
if (a*b)%2 ==0:
  print('Even')
else:
  print('Odd')
s = input()
if s[3] == s[4] and s[5] == s[6]:
  print("Yes")
elif
  print("No

### FIXED CODE ###

s = input()
if s[2] == s[3] and s[4] == s[5]:
  print("Yes")
else:
  print("No")
n, m = map(int, input().split())
jobs = dict()

for i in range(n):
    a, b = map(int, input().split())
    if not a in jobs.keys():
        jobs[a] = [b]
    else:
        jobs[a].append(b)

print(jobs)

days = []
money_list = [0]
for i in range(1, m+1):
    # print('days', days)
    if i in jobs.keys():
        money_list.extend(jobs[i])
    # print(money_list)
    days.append(max(money_list))
    money_list.remove(max(money_list))

print(sum(days))


### FIXED CODE ###

import heapq

n, m = map(int, input().split())
jobs = dict()

for i in range(n):
    a, b = map(int, input().split())
    if not a in jobs.keys():
        jobs[a] = [-b]
    else:
        jobs[a].append(-b)
# print(jobs)
sum_money = 0
money_list = [0]
heapq.heapify(money_list)
for i in range(1, m+1):
    if i in jobs.keys():
        for money in jobs[i]:
            heapq.heappush(money_list, money)
    # print(money_list)
    max_money = -heapq.heappop(money_list)
    sum_money += max_money
    if max_money == 0:
        heapq.heappush(money_list, 0)
print(sum_money)
def main():
    a,b,c,d,e,f= map(int,input().split())

    # 100gあたりE [g]溶ける
    # ビーカーにF [g]いれられる
    # 濃度は100*砂糖 / (水＋砂糖)


    mizu=[]
    sato=[]
    noudo=[]


    x = int(f/100//a) +1
    y = int(f/100//b) +1

    for i in range(x):
        for j in range(y):
            mizu.append(i*100*a+j*100*b)

    mizu = [i for i in mizu if i <= f]
    mizu = list(set(mizu))
    mizu.sort()

    tokeru = int(f/100) * e
    x = tokeru // c +1
    y = tokeru // d +1

    for i in range(x):
        for j in range(y):
            sato.append(i*c + j*d)

    sato = [i for i in sato if i < tokeru]
    sato = list(set(sato))
    sato.sort()
    sato.remove(0)
    mizu.remove(0)

    tmp =0

    for i in mizu:
        for j in sato:
            if i + j <= f and i//100*e >= j :
                if tmp <= (100*j) / (i + j):
                    ans = [i+j,j]

    print(ans)


if __name__ == "__main__":
        main()


### FIXED CODE ###


def main():
    a,b,c,d,e,f= map(int,input().split())

    # 100gあたりE [g]溶ける
    # ビーカーにF [g]いれられる
    # 濃度は100*砂糖 / (水＋砂糖)


    mizu=[]
    sato=[]


    x = int(f/100/a) +1
    y = int(f/100/b) +1

    for i in range(x):
        for j in range(y):
            mizu.append(i*100*a + j*100*b)

    mizu = [i for i in mizu if i <= f]
    mizu = list(set(mizu))
    mizu.sort()

    tokeru = int(f/100) * e
    x = int(tokeru / c) +1
    y = int(tokeru / d) +1

    for i in range(x):
        for j in range(y):
            sato.append(i*c + j*d)

    sato = [i for i in sato if i < tokeru]
    sato = list(set(sato))
    sato.sort()
#    sato.remove(0)
#    mizu.remove(0)

    tmp =0

    for i in mizu:
        for j in sato:
            if i + j <= f and i + j !=0:
                if int(i/100)*e >=j:
                    if tmp <= (100*j) / (i + j):
                        tmp = (100*j) / (i + j)
                        ans = str(i+j) + " " + str(j)

    print(ans)


if __name__ == "__main__":
        main()
import math

N, A, B = map(int, input().split())
x = math.floor(N // (A + B))
y = N % (A + B)

print(A * x + min(A, y))

### FIXED CODE ###

S = input()
if S[0] == S[1] and S[1] == S[2]:
  print("No")
else:
  print("Yes")
import sys
a = int(sys.argv[0])
b = a ** 3
print b

### FIXED CODE ###

print int(raw_input()) ** 3
from operator import itemgetter

n, m = [int(i) for i in input().split()]
a = sorted([int(i) for i in input().split()])
#print(a)

bc = []
for _ in range(m):
  bc.append([int(i) for i in input().split()])
bc = sorted(bc, key=itemgetter(1), reverse=True)
#print(bc)

change = []
for b,c in bc:
  len_change = len(change)
  b_up = b
  if n - len_change < b:
    b_up = n - len_change
  change += [c]*b_up
  if b_up != b:
    break
#print(change)

ans = 0
for i in range(n):
  #print(ans)
  if a[i] < change[i]:
    ans += change[i]
  else:
    ans += sum(a[i:])
    break
    
print(ans)

### FIXED CODE ###

from operator import itemgetter

n, m = [int(i) for i in input().split()]
a = sorted([int(i) for i in input().split()])
#print(a)

bc = []
for _ in range(m):
  bc.append([int(i) for i in input().split()])
bc = sorted(bc, key=itemgetter(1), reverse=True)
#print(bc)

change = []
for b,c in bc:
  len_change = len(change)
  b_up = b
  if n - len_change < b:
    b_up = n - len_change
  #print(b_up)
  change += [c]*b_up
  if b_up != b:
    break
change += [0]*(n-len(change))

ans = 0
for i in range(n):
  #print(ans)
  #print(i)
  if a[i] < change[i]:
    ans += change[i]
  else:
    ans += sum(a[i:])
    break
    
print(ans)
A,B=map(int,input().split())
print(6-(A+B))

### FIXED CODE ###

a=int(input())
b=int(input())
print(6-a-b)
import math
N, a, b = map(int,input().split())
p = 10 ** 9 +7
def fc(t):
  if t == 0:
    return 1
  elif t % 2 == 1:
    return ((fc(t//2)) **2 )* 2
  else:
    return (fc(t//2)) ** 2
A = math.factorial(a)
B = math.factorial(b)
n_c_a = 1
n_c_b = 1
for i in range(a):
  n_c_a *= n-i
for j in rnage(b):
  n_c_b *= n-j
m_a = (n_c_a*pow(A,p-2))% p
m_b = (n_c_b*pow(B,p-2))% p
print((pow(2,N) - 1 - m_a - m_b) % p)


### FIXED CODE ###

N, a, b = map(int,input().split())
p = pow(10,9) + 7
def comb(n,r):
  bunshi = 1
  for i in range(n-r+1, n+1):
    bunshi =bunshi * i % p
  bunbo = 1
  for i in range(1, r+1):
    bunbo = bunbo * i % p
  return bunshi * pow(bunbo, p-2, p)
print((pow(2,N, p) - 1 - comb(N,a) - comb(N,b)) % p)
import itertools

n = int(input())
N = [i for i in range(1,n+1)]
P = tuple(map(int, input().split()))
Q = tuple(map(int, input().split()))

for i, j in enumerate(itertools.permutations(N)):
    if j == P:
        a = i + 1
    elif j == Q:
        b = i + 1
print(abs(a - b))

### FIXED CODE ###

import itertools
n=int(input())
r=list(itertools.permutations(range(1,n+1)))
p=tuple(map(int,input().split()))
q=tuple(map(int,input().split()))
print(abs(r.index(p)-r.index(q)))
a,b,c = list(map(int, input()))
if a <= c and c <= b:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a,b,c = list(map(int, input().split()))
if a <= c and c <= b:
  print("Yes")
else:
  print("No")
n = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
a.sort()
b.sort()
c.sort()
c = c[::-1]
answer,x,y = 0,0,n-1
for j in b:
	for k in range(x,n):
		if a[k] >= j:
			x = k
			break
		elif k == n-1:
			x = n
	for k2 in range(y+1):
		if c[k2] <= j:
			y = k2
			break
		elif k2 == n-1:
			y = n
	answer += x*y
print(answer)


### FIXED CODE ###

import bisect
n = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
a.sort()
c.sort()
answer = 0
for i in b:
	x = bisect.bisect_right(c,i)
	y = bisect.bisect_left(a,i)
	answer += (n-x)*y
print(answer)
n=int(input())
x=[int(i) for i in input().split()]
a=[]
p=0
for i in range(1,n**n):
  for j in range(n):
    p+=(x[j]-i)**2
  a.append(p)
  p=0
print(min(a))

### FIXED CODE ###

n=int(input())
x=[int(i) for i in input().split()]
a=[]
p=0
for i in range(1,max(x)+1):
  for j in range(n):
    p+=(x[j]-i)**2
  a.append(p)
  p=0
print(min(a))
def main():
    A= int(input())
    B= int(input())
    C= int(input())
    output = C - A + B
    if output < 0:
        print(0)
    else:
        print(output)
main()

### FIXED CODE ###

def main():
    A, B, C = map(int, input().split())
    output = C - A + B
    if output < 0:
        print(0)
    else:
        print(output)
main()
s=input()
a=input()
a=a.split()


c=1
for x in a:
  c=c*int(x)
  
if c =< 10**18:
  print(c)
else:  
  print("-1") 


### FIXED CODE ###

a=int(input())
A=list(map(int,input().split()))
ans=1
if A.count(0)==0:
    for x in A:
      ans*=x
      if ans>10**18:
        break


    if ans>10**18:
      print(-1)
    else:
      print(ans)
else:
  print(0)
A, B, K = (int(i) for i in input().split())
list = []


for i in range(1, 100):
  if i % A == 0 and i % B == 0:
    list.append(i)
print(list[len(list)-K])


### FIXED CODE ###

A, B, K = (int(i) for i in input().split())
list = []
 
for i in range(101):
  if i != 0:
    if A % i == 0 and B % i == 0:
      list.append(i)
print(list[len(list)-K])
mport bisect

N=int(input())
A=[int(input()) for i in range(N)]

B=[]
for a in A:
  p=bisect.bisect_left(B,a)
  if p==0:
    B.insert(0,a)
  else:
    B[p-1]=a

print(len(B))


### FIXED CODE ###

import bisect

N=int(input())
A=[-int(input()) for i in range(N)]

B=[]
c=0
for a in A:
  p=bisect.bisect_right(B,a)
  if p==c:
    B.append(a)
    c += 1
  else:
    B[p]=a

print(len(B))
n,k = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
if a[0] >= k:
    print(0)
    exit()
if sum(a) < k:
    print(n)
    exit()
def search(m):
    if m >= k:
        return True
    x = k-a[m]
    dp = [[float("INF")]*(x+1) for i in range(n)]
    dp[0][0] = 0
    now = 0
    for i in range(n):
        if i == m:
            continue
        for j in range(x+1):
            if dp[now][j] !=float("INF"):
                dp[now+1][j] = min(dp[now][j],dp[now+1][j])
                if a[i]+j < x:
                    dp[now+1][a[i]+j] = a[i]+j
                else:    
                    dp[now+1][-1] = min(a[i]+j,dp[now+1][-1])
        now += 1
    if dp[-1][-1] == float("INF"):
        return True
    elif dp[-1][-1] >= k:
        return False
    else:
        return True
le = 0
ri = n


while ri > le+1:
    m = (ri+le)//2

    if search(m):
        ri = m
    else:
        le = m

print(le+1)

### FIXED CODE ###

n,k = map(int,input().split())
a = [0]+sorted(filter(lambda x: x < k, map(int,input().split())))
n = len(a)

def search(m):

    dp = [1] + [0]*k
    for i in range(n):
        if i == m:
            continue
        for j in range(k,a[i]-1,-1):
            dp[j] |= dp[j-a[i]]
    for i in range(k-a[m],k):
        if dp[i]:
            return True
    return False
le = 0
ri = n


while ri > le+1:
    m = (ri+le)//2

    if search(m):
        ri = m
    else:
        le = m

print(le)
import sys

N=int(input())
for i in range(1,10):
  if n/i==n//i<10:
    print("Yes")
    sys.exit()
  else:
    print("No")

### FIXED CODE ###

import sys
 
N=int(input())
for i in range(1,10):
  if N/i==N//i  and N/i<10:
    print("Yes")
    sys.exit()
print("No")
N = int(input(""))
d = 0
for a in range(N):
  for b in range(N):
    for c in range(N):
      if a*b+c == N:
        d += 1

### FIXED CODE ###

S = input("")
if S[-1] == "s":
  print(S+"es")
else:
  print(S+"s")
import math
a=list(map(int,input().split()))
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a[0], a[1]))

### FIXED CODE ###

import fractions
a=list(map(int,input().split()))
def W(x, y):
    return (x * y) // fractions.gcd(x, y)
print(W(a[0], a[1]))
S = input().rstrip()
N = len(S)
K = int(input())
A = set()
if N == 1:
    print(S)
    exit()
for i in range(N-1):
    A.add(S[i:])
A = list(A)
A.sort()
print(A)
cnt, i = 0, 0
while cnt + len(A[i]) < K:
    cnt += len(A[i])
    i += 1
print(A[i][:K-cnt])



### FIXED CODE ###

S = input().rstrip()
N = len(S)
K = int(input())
A = []
for i in range(N):
    A.append(S[i:])
A.sort()
B = set()
flg = False
for i in range(len(A)):
    for j in range(1,len(A[i])+1):
        B.add(A[i][:j])
        if len(B)==K:
            flg = True
            break
    if flg: break
B = list(B)
B.sort()
print(B[-1])
K = input()
S = int(input())

if len(K) <= S:
    print(K)
else:
    print(K[:S] + "...")


### FIXED CODE ###

K = int(input())
S = input()
if len(str(S)) <= K:
    print(S)
else:
    print(S[:K]+'...')
import sys

H, W, d = map(int, input().split())

color = 'RGBY'
ret = [['' for _ in range(W)] for _ in range(H)]
flag = [[[True, True, True, True] for _ in range(W)] for _ in range(H)]

for i in range(H):
    for j in range(W):
        for k in range(4):
            if flag[i][j][k]:
                ret[i][j] = color[k]

                for p in range(d + 1):
                    q = d - p

                    if p >= i and q >= j: flag[i - p][j - q][k] = False
                    if p < H - i and q >= j: flag[i + p][j - q][k] = False
                    if p >= i and q < W - j: flag[i - p][j + q][k] = False
                    if p < H - i and q < W - j: flag[i + p][j + q][k] = False
                break

        # なにも入らなかった
        if ret[i][j] is '':
            print('hoge')

print(ret, file=sys.stderr)

for a in ret:
    print(''.join(a))


### FIXED CODE ###


H, W, d = map(int, input().split())

ret = [['RGBY'[(i + j) // d % 2 + (i - j) // d % 2 * 2] for j in range(W)] for i in range(H)]

for a in ret:
    print(''.join(a))
h,w = map(int,input().split())

import numpy as np
dp = np.zeros((h,w),np.int32)
s = np.full((h,w),'.')
for H in range(h):
    S = input()
    for W in range(w):
        s[H][W] = S[W]
        own = s[H][W]
        if H==0 and W==0: dp[H][W] = 0 if own=='.' else 1
        elif H==0: dp[H][W] = dp[H][W-1]+1 if s[H][W-1]=='.' and own=='#' else dp[H][W-1]
        elif W==0: dp[H][W] = dp[H-1][W]+1 if s[H-1][W]=='.' and own=='#' else dp[H-1][W]
        else:
            dp[H][W] = min(dp[H][W-1], dp[H-1][W])
            if own=='#':
                if s[H][W-1]=='.' and s[H-1][W]=='.': dp[H][W] += 1
                elif s[H][W-1]=='#' and s[H-1][W]=='.': dp[H][W] = min(dp[H][W-1], dp[H-1][W]+1)
                elif s[H][W-1]=='.' and s[H-1][W]=='#': dp[H][W] = min(dp[H][W-1]+1, dp[H-1][W])
print(dp[h-1,w-1])                


### FIXED CODE ###

h,w = map(int,input().split())

import numpy as np
dp = np.zeros((h,w),np.int32)
s = np.full((h,w),'.',np.str)
for H in range(h):
    S = input()
    for W in range(w):
        s[H][W] = S[W]
        own = s[H][W]
        if H==0 and W==0: dp[H][W] = 0 if own=='.' else 1
        elif H==0: dp[H][W] = dp[H][W-1]+1 if s[H][W-1]=='.' and own=='#' else dp[H][W-1]
        elif W==0: dp[H][W] = dp[H-1][W]+1 if s[H-1][W]=='.' and own=='#' else dp[H-1][W]
        else:
            dp[H][W] = min(dp[H][W-1], dp[H-1][W])
            if own=='#':
                if s[H][W-1]=='.' and s[H-1][W]=='.': dp[H][W] += 1
                elif s[H][W-1]=='#' and s[H-1][W]=='.': dp[H][W] = min(dp[H][W-1], dp[H-1][W]+1)
                elif s[H][W-1]=='.' and s[H-1][W]=='#': dp[H][W] = min(dp[H][W-1]+1, dp[H-1][W])
print(dp[h-1,w-1])
import sys
N, M = map(int, input().split())
xrd = [[] for i in range(N)]
x = [None]*N


def check(s):
    for t, d in xrd[s]:
        if x[t] is None:
            x[t] = x[s] + d
            check(t)
        else:
            if x[t] != x[s] + d:
                print("No")
                sys.exit()


for i in range(M):
    L, R, D = map(int, input().split())
    xrd[L-1].append([R-1, D])
    xrd[R-1].append([L-1, -D])

for i in range(N):
    if x[i] is None:
        x[i] = 0
        check(i)


print("Yes")


### FIXED CODE ###

import sys
sys.setrecursionlimit(200002)

N, M = map(int, input().split())
G = [[] for _ in range(N)]
x = [None] * N

def fail():
    print("No")
    exit()

def dfs(s):
    global x, G
    for t, d in G[s]:
        if x[t] is None:
            x[t] = x[s] + d
            dfs(t)
        else:
            if x[t] != x[s] + d:
                fail()

for _ in range(M):
    L, R, D = map(int, input().split())
    G[L-1].append([R-1,  D])
    G[R-1].append([L-1, -D])

for i in range(N):
    if x[i] is None:
        x[i] = 0
        dfs(i)

print("Yes")
# -*- coding:utf-8 -*-
import sys

def dfs(x, y, sym):
	tile[x][y] = "."
	for i in range(len(DX)):
		nx = x + DX[i]
		ny = y + DY[i]
		if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym:
			dfs(nx, ny, sym)

def solve():
	res = 0
	for i in range(N):
		for j in range(M):
			if tile[i][j] != ".":
				if tile[i][j] == "@":
					dfs(i, j, "@")
					res += 1
				elif tile[i][j] == "#":
					dfs(i, j, "#")
					res += 1
				elif tile[i][j] == "*":
					dfs(i, j, "*")
					res += 1
	print(res)

counter=0
DX = [-1, 0, 1, 0]
DY = [0, -1, 0, 1]
sys.setrecursionlimit(1000000)

while True:
	counter+=1
	line = input()
	if ' ' in line:
		nums = line.split(" ")
		N = int(nums[0])
		M = int(nums[1])
		tile = [[0 for i in range(N)]for j in range(M)]
		if N==0 and M==0:
			break
	else:
		tile[counter-2] = list(line)
	if (counter-1)==M:
		solve()
		counter = 0

### FIXED CODE ###

# -*- coding:utf-8 -*-
import sys
def dfs(x, y, sym):
	tile[x][y] = "."
	for i in range(len(DX)):
		nx = x + DX[i]
		ny = y + DY[i]
		if (0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym):
			dfs(nx, ny, sym)

def solve():
	res = 0
	for i in range(N):
		for j in range(M):
			sym = tile[i][j]
			if tile[i][j] != ".":
				if tile[i][j] is sym:
					dfs(i, j, sym)
					res += 1
	print(res)

counter=0
DX = [-1,0,1,0]
DY = [0,-1,0,1]
sys.setrecursionlimit(10**7)
while True:
	line = input()
	if " " in line:
		nums = line.split(" ")
		N = int(nums[0])
		M = int(nums[1])
		tile = [[0 for i in range(M)] for j in range(N)]
	else:
		tile[counter-1] = list(line)
	if N is 0 and M is 0:
		break
	counter += 1
	if counter-1 is N:
		solve()
		counter = 0
s = input()
num = []
lists = ["A","c","G","T"]
count = 0

for i in range(len(s)):
    if s[i] in lists:
        count +=1
    else:
        num.append(count)
print(max(num))
 

### FIXED CODE ###

s = input()
num = []
lists = ["A","C","G","T"]
count = 0

for i in range(len(s)):
    if s[i] in lists:
        count +=1
    else:
        num.append(count)
        count = 0
else:
    num.append(count)
print(max(num))
aa,b,x = map(int, input().split())
if a <= x and x <= a +b:
    print ('YES')
else:
    print('NO')

### FIXED CODE ###

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