Harryxun/stf_run huggingface dataset:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

A_sum = A + V * T
B_sum = B + W * T

if B > A:
    if A_sum >= B_sum:
        print('YES')
    else:
        print('NO')

else:
    if A_sum <= B_sum
        print('YES')
    else:
        print('NO')


### FIXED CODE ###

A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())


if A < B:
    A_sum = A + (V * T)
    B_sum = B + (W * T)
    if A_sum >= B_sum:
        print('YES')
    else:
        print('NO')

else:
    A_sum = A - (V * T)
    B_sum = B - (W * T)
    if A_sum <= B_sum:
        print('YES')
    else:
        print('NO')
N=int(input())
A = list(map(int,input().split()))
Q=int(input())
B = [0]*Q
C = [0]*Q
for i in range(Q):
    B[i],C[i]=map(int,input().split())
#print(B,C)
#print(A)
#a = 0
#for i in range(N):
    #a += A[i]
#print(a)
ls = []
for i in range(1,5):#10**5):
    ls.append(A.count(i))
#print(ls)
sumA = sum(A)
#print("sumA",sumA)
for j in range(Q):
    #print(B[j]-1)
    #print(ls)
    sumA += (C[j]-B[j])*ls[B[j]-1]
    #print("j","C[j]","B[j]","ls[B[j]]",j,C[j],B[j],ls[B[j]-1])
    ls[C[j]-1] += ls[B[j]-1]
    ls[B[j]-1] = 0
    print(sumA)


### FIXED CODE ###

N=int(input())
A = list(map(int,input().split()))
Q=int(input())
B = [0]*Q
C = [0]*Q
for i in range(Q):
    B[i],C[i]=map(int,input().split())
#print(B,C)
#print(A)
#a = 0
#for i in range(N):
    #a += A[i]
#print(a)
ls = [0]*100000
for i in A:
    ls[i-1] += 1
#print(ls)
sumA = sum(A)
#print("sumA",sumA)
for j in range(Q):
    #print(B[j]-1)
    #print(ls)
    sumA += (C[j]-B[j])*ls[B[j]-1]
    #print("j","C[j]","B[j]","ls[B[j]]",j,C[j],B[j],ls[B[j]-1])
    ls[C[j]-1] += ls[B[j]-1]
    ls[B[j]-1] = 0
    print(sumA)
s = input()
ans = []
counter = 0
for i in s:
    if i in 'ATGC':
        counter += 1
    else:
        ans.append(counter)
        counter = 0
print(max(ans))

### FIXED CODE ###

s = input()
ans = []
counter = 0
for i in s:
    if i in 'ATGC':
        counter += 1
    else:
        counter = 0
    ans.append(counter)
print(max(ans))
import math
a, b, h, m = map(int,input().split())
fine = math.radians(3 * (5h - m))
c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(fine))
print(c)


### FIXED CODE ###

import math
a, b, h, m = map(int,input().split())
fine = math.radians(30 * h - 11 * m / 2)
c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(fine))
print(c)
# coding: utf-8
import collections
import math
list = input().split()
N = int(list[0])
M = int(list[1])
a = input().split()
x = 0
hako = [0]
for i in a:
    hako.append(int(i))
B = []
b = 0
for i in hako:
    b += i
    B.append(b%M)
c = collections.Counter(B)
aaa =[]
for i in c:
    if c[i] >= 2:
        aaa.append(c[i])
def kumi(n):
    return int(math.factrial(n)//(2*math.factrial(n-2)))
for i in aaa:
    x += kumi(i)
print(x)

### FIXED CODE ###

# coding: utf-8
import collections
import math
list = input().split()
N = int(list[0])
M = int(list[1])
a = input().split()
x = 0
hako = [0]
for i in a:
    hako.append(int(i))
B = []
b = 0
for i in hako:
    b += i
    B.append(b%M)
c = collections.Counter(B)
aaa =[]
for i in c:
    if c[i] >= 2:
        aaa.append(c[i])
def kumi(n):
    return int(math.factorial(n)/(2*math.factorial(n-2)))
for i in aaa:
    x += kumi(i)
print(x)
import sys
import itertools

x,y,z,k = map(int,(input().split()))

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

a.sort(reverse=True)
b.sort(reverse=True)
c.sort(reverse=True)

comb_a = [a[0]]
comb_b = [b[0]]
comb_c = [c[0]]
next = []
sum = []

comb = list(itertools.product(comb_a,comb_b,comb_c))
num_comb = len(comb)

#while num_comb < k*2 and num_comb < 3000:
while num_comb < 3000:


    next = []
    for i in a,b,c:
        if len(i) >= 2:
            next.append(i[0] - i[1])
        if len(i) == 1:
            next.append(10000000001)
    if min(next) != 10000000001:
        if len(a) >= 2 and min(next) == a[0] - a[1]:
            comb_a.append(a[1])
            a.pop(0)
        elif len(b) >= 2 and min(next) == b[0] - b[1]:
            comb_b.append(b[1])
            b.pop(0)
        elif len(c) >= 2 and min(next) == c[0] - c[1]:
            comb_c.append(c[1])
            c.pop(0)
    else:
        break
    comb = list(itertools.product(comb_a,comb_b,comb_c))
    num_comb = len(comb)
    
for i in comb:
    sum.append(i[0]+i[1]+i[2])
sum.sort(reverse=True)
for i in range(k):
    print(sum[i])


### FIXED CODE ###

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

result = 0
if e - a <= k:
    print('Yay!')
elif e - a > k:
    print(':(')
if eval(input().replace(" ","==")):
  print("H")
else:
  print("D")

### FIXED CODE ###

a,b=input().split()
if a==b:
  print("H")
else:
  print("D")
n, mw = map(int, input().split())
w = []
v = []

for i in range(n):
    ww, vv = map(int, input().split())
    w.append(ww)
    v.append(vv)

dp = [[0] * (mw + 1) for i in range(n + 1)]

for i in range(n):
    for j in range(mw + 1):
        if j < w[i]:
            dp[i + 1][j] = dp[i][j]
        else:
            dp[i+1][j] = max(dp[i][j], dp[i][j-w[i]]+v[i])

print(dp[n][mw])


### FIXED CODE ###

n, mw = map(int, input().split())
w = []
v = []

for i in range(n):
    ww, vv = map(int, input().split())
    w.append(ww)
    v.append(vv)

dp = [[float("inf")] * (n*(10**3+1)) for i in range(n + 1)]
dp[0][0] = 0

for i in range(n):
    for j in range(n*1001):
        if j < v[i]:
            dp[i + 1][j] = dp[i][j]
        else:
            dp[i+1][j] = min(dp[i][j], dp[i][j-v[i]]+w[i])

for i in range(n * 1001):
    if dp[n][i] <= mw:
        ans = i

print(ans)
import sys
sys.setrecursionlimit(10*10)
N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]
MOD = 1000000007
def Fib(n, A, MOD, memo={}):
    if n in A:
        return 0
    elif n == 0:
        return 1
    elif n == 1:
        return 1
    elif n in memo:
        return memo[n]
    else:
        memo[n] = ( Fib(n-1, A, MOD, memo) + Fib(n-2, A, MOD, memo) ) % MOD
        return memo[n]

print(Fib(N, A, MOD))


### FIXED CODE ###

N, M = map(int, input().split())
A = set([int(input()) for _ in range(M)])
MOD = 1000000007
memo = [0]*(N+1)
memo[0] = 1
if 1 not in A:
    memo[1] = 1
for i in range(2, N+1):
    if i not in A:
        memo[i] = (memo[i-2] + memo[i-1])%MOD
print(memo[N])
a,b,c,d=map(int, input().split())
while True:
  	b -= c
 	if c<=0:
   		print("Yes")
    	break
    a -=d
    if a<=0:
		print("No")
      	break


### FIXED CODE ###


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

while True:
  c -= b
  if c <= 0:
    print('Yes')
    break
  
  a -= d
  if a <= 0:
    print('No')
    break
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
n = int(input())

l = list(range(1,n+1))
i = -1
ans = 0
while i > -n:
  tmp = 0
  for j in range(n):
    tmp += l[j+i] % l[j]
  ans = max(ans, tmp)
  i -= 1
print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
n = int(input())

ans = int(n*(n-1)//2)

print(ans)
N, K = map(int, input().split())

XY = []
for _ in range(N):
    x, y = map(int, input().split())
    XY.append((x, y))
    

dots = XY[:]

import sys
INT_MAX = sys.maxsize

x_dots = [(x, y) for x, y in dots]
x_dots = sorted(x_dots)
y_dots = [(x, y) for x, y in dots]
y_dots = sorted(x_dots, key=lambda x: x[1])

ans = INT_MAX
for l in range(N):
    for r in range(l+1, N+1):
        for u in range(N):
            for t in range(u+1, N+1):
                xy_dots =  set(x_dots[l:r]) & set(y_dots[u:t])
                if len(xy_dots) >= K:
                    #print("---")
                    #print(l, r, x_dots[l:r])
                    #print(u, t, y_dots[u:t])
                    l = x_dots[l:r][0][0]
                    r = x_dots[l:r][-1][0]
                    u = y_dots[u:t][0][1]
                    t = y_dots[u:t][-1][1]
                    #print((r-l)*(t-u))
                    ans = min(ans, (r-l)*(t-u))
print(ans)


#y_dots = sorted(y_dots, key=lambda x: x[1])
#ans = INT_MAX


### FIXED CODE ###

N, K = map(int, input().split())

XY = []
for _ in range(N):
    x, y = map(int, input().split())
    XY.append((x, y))
    
dots = XY[:]

import sys
INT_MAX = sys.maxsize

ans = INT_MAX

import itertools
for ((left_x, _), (right_x, _)) in itertools.combinations(dots, 2):
    if left_x > right_x:
        left_x, right_x = right_x, left_x
    for ((_, under_y), (_, top_y)) in itertools.combinations(dots, 2):
        if under_y > top_y:
            under_y, top_y = top_y, under_y
        counter = 0
        for d_x, d_y in dots:
            if  (left_x <= d_x) and (d_x <= right_x) and (under_y <= d_y) and (d_y <= top_y):
                counter += 1
                
        if counter >= K:
            area = (top_y-under_y) * (right_x-left_x)
            if ans > area:
                ans = area
            
print(ans)
while True:
    x = int(input())
    if x == 0:
        break
    table = x.split()
    print(sum(table))



### FIXED CODE ###

while True:
  x = sum(map(int, input()))

  if x == 0:
    break

  print(x)
import math

N  = int(raw_input())

ans = [0, 0]

T, A = [0] * 1001, [0] * 1001

for i in range(N):

    T[i], A[i] = map(float, raw_input().split())

    if i != 0 and T[i - 1] - T[i] >= 0 or A[i - 1] - A[i] >= 0:

        if (math.ceil(T[i  - 1] / T[i]) >= (math.ceil(A[i - 1] / A[i])):
            m  = math.ceil(T[i  - 1] / T[i]) 

        else:
            m = math.ceil(A[i - 1] / A[i])

        T[i] *= m
        A[i] *= m

    ans = [T[i], A[i]]

print "%d" % sum(ans)

### FIXED CODE ###

N  = int(raw_input())

ans = [0, 0]
T, A = [0] * 1001, [0] * 1001

for i in range(N):
    T[i], A[i] = map(int, raw_input().split())

    if i != 0 and T[i - 1] - T[i] > 0 or A[i - 1] - A[i] > 0:

        if (T[i  - 1] / T[i]) > (A[i - 1] / A[i]):
            m  = T[i  - 1] / T[i]
            if T[i - 1] % T[i] != 0:
                m += 1 

        else:
            m = A[i - 1] / A[i]
            if A[i - 1] % A[i] != 0:
                m += 1

        T[i] *= m
        A[i] *= m

    ans = [T[i], A[i]]

print sum(ans)
N, M = map(int,input().split())
A = sorted(list(map(int,input().split())))
D = [list(map(int,input().split())) for k in range(M)]
D = sorted(D, key = lambda x: -x[1])

now = 0
for d in D:
    for k in range(now,now+d[0]):
        if A[k] < d[1]:
            A[k] = d[1]
            now += 1
        else:
            now = k
            break
    if now == N:
        break
print(sum(A))

### FIXED CODE ###

N, M = map(int,input().split())
A = sorted(list(map(int,input().split())))
D = [list(map(int,input().split())) for k in range(M)]
D = sorted(D, key = lambda x: -x[1])

now = 0
for d in D:
    for k in range(now,now+d[0]):
        if now == N:
            break
        if A[k] < d[1]:
            A[k] = d[1]
            now += 1
        else:
            now = k
            break

print(sum(A))
N, K = map(int, input().split())
P = list(map(int, input().split()))
C = list(map(int, input().split()))
ans = -1000000000
for i in range(N):
  cost = 0
  S = []
  x = P[i] - 1
  l = 1
  while 1:
    cost += C[x]
    S.append(cost)
    if x == i:
      break
    l += 1
    x = P[x] - 1
  if cost > 0:
    if K % l != 0:
      ans = max(ans, cost * (K // l) + max(S[:K % l]), cost * ((K // l) - 1) + max(S))
    else:
      ans = max(ans, cost * (K // l))
  else:
    ans = max(ans, max(S[:min(K, L)]))
print(ans)

### FIXED CODE ###

N, K = map(int, input().split())
P = list(map(int, input().split()))
C = list(map(int, input().split()))
ans = -1000000000
for i in range(N):
  cost = 0
  S = []
  x = P[i] - 1
  l = 1
  while 1:
    cost += C[x]
    S.append(cost)
    if x == i:
      break
    l += 1
    x = P[x] - 1
  if cost > 0:
    for j in range(l):
      ans = max(ans, S[j] + cost * ((K - j - 1) // l))
  else:
    ans = max(ans, max(S[:min(K, l)]))
print(ans)
S = input()
wb = ["0" if i % 2 == 0 else "1" for i in range(len(S))]
bw = ["1" if i % 2 == 0 else "0" for i in range(len(S))]

cnt_wb = 0
cnt_bw = 0
for i in range((len(S))):
  if w_b[i] != S[i]:
    cnt_wb += 1
  if bw[i] != S[i]:
    cnt_bw += 1
    
print (min(cnt_eb, cnt_bw))

### FIXED CODE ###

S = input()
wb = ["0" if i % 2 == 0 else "1" for i in range(len(S))]
bw = ["1" if i % 2 == 0 else "0" for i in range(len(S))]

cnt_wb = 0
cnt_bw = 0
for i in range((len(S))):
  if wb[i] != S[i]:
    cnt_wb += 1
  if bw[i] != S[i]:
    cnt_bw += 1
    
print (min(cnt_wb, cnt_bw))
n, r = map(int,input().split())
if n < 10:
  return r
else:
  return 100 * (10 - n)


### FIXED CODE ###

def main():
  n, r = map(int,input().split())
  if n > 9:
    print(r)
  else:
    print(r + 100 * (10 - n))

main()
n = int(input())
s = [int(x) for x in list(input().split()) if int(x)%2 == 0]
ans = "APPROVED"
for i in s:
  if i%5 != 0 and i%3 != 0:
    ans = "DENIED"
    pass
print(ans)


### FIXED CODE ###

s = [int(x) for x in list(input().split())]
ans = "No"
for i in range(3):
  tmp = [x/s[i] == 1 for x in s]
  is_poor = 0
  for j in tmp:
    is_poor += j
  if is_poor == 2:
    ans = "Yes"
    pass
print(ans)
x,a = map(int,input().split())
if x <　a:
	print(0)
else:
	print(10)

### FIXED CODE ###

x,a = map(int,input().split())
if x < a:
	print(0)
else:
	print(10)
A, B = map(int, input().split())
print(max(a, b) * 2 - 1)

### FIXED CODE ###

# coding: utf-8
A, B = map(int, input().split())
if A == B:
    print(A * 2)
else:
    print(max(A, B) * 2 - 1)
def registar(nyukin,coin):
    oturi=nyukin-coin*int(nyukin/coin)
    return oturi,int(nyukin/coin)

x,coin_500=registar(x,500)
#print(coin_500)
x,coin_5=registar(x,5)
x,coin_1=registar(x,1)

#print(coin_500,coin_5,coin_1)
uresisa=coin_500*1000+coin_5*5
print(uresisa)

### FIXED CODE ###

x=int(input())

coin_1=0
coin_5=0
coin_500=0

def registar(nyukin,coin):
    oturi=nyukin-coin*int(nyukin/coin)
    return oturi,int(nyukin/coin)

x,coin_500=registar(x,500)
#print(coin_500)
x,coin_5=registar(x,5)
x,coin_1=registar(x,1)

#print(coin_500,coin_5,coin_1)
uresisa=coin_500*1000+coin_5*5
print(uresisa)
N = int(input())
int ans = 1
while N > ans:
  ans = ans * 2
ans = N if ans == N else ans/2
print(ans)


### FIXED CODE ###

N = int(input())
ans = 1
while N > ans:
  ans = ans * 2
ans = N if ans == N else ans//2
print(ans)
import math
 
n,m = list(map(int, input().split()))

dan=[]

for i in range(m):
    b=list(map(int, input().split()))
    dan.append(b[0])

fib=[0 for i in range(n+2)]
fib[1]=1
fib[2]=2

for ii in range(n-1):
    i=ii+3
    fib[i]=(fib[i-1]+fib[i-2])%1000000007
    
#print(fib,dan)

eachans=[]

if(m==0):
    print(fib[n])

if(m>=1):
    if(dan[0]!=1):
        eachans.append(fib[dan[0]-1])

for i in range(m-1):
    if(dan[i+1]-dan[i]-2 == 0):
        eachans.append(1)
    elif(dan[i+1]-dan[i]-2 == -1):
        eachans.append(0)
    else:
        eachans.append(fib[dan[i+1]-dan[i]-2])
    #print(dan[i+1]-dan[i]-1)

if(m>=1):
    if(dan[-1]!=n-1):
        eachans.append(fib[n-dan[-1]-1])
    
if(m>=1):
    #print(eachans)
    ans=1
    for i in range(len(eachans)):
        ans = ans*eachans[i]%1000000007

print(ans)

### FIXED CODE ###

import math
 
n,m = list(map(int, input().split()))

dan=[]

for i in range(m):
    b=list(map(int, input().split()))
    dan.append(b[0])

fib=[0 for i in range(n+2)]
fib[1]=1
fib[2]=2

for ii in range(n-1):
    i=ii+3
    fib[i]=(fib[i-1]+fib[i-2])%1000000007
    
#print(fib,dan)

eachans=[]

if(m==0):
    print(fib[n])

if(m>=1):
    if(dan[0]!=1):
        eachans.append(fib[dan[0]-1])

    for i in range(m-1):
        if(dan[i+1]-dan[i]-2 == 0):
            eachans.append(1)
        elif(dan[i+1]-dan[i]-2 == -1):
            eachans.append(0)
        else:
            eachans.append(fib[dan[i+1]-dan[i]-2])
        #print(dan[i+1]-dan[i]-1)

if(m>=1):
    if(dan[-1]!=n-1):
        eachans.append(fib[n-dan[-1]-1])
    
if(m>=1):
    #print(eachans)
    ans=1
    for i in range(len(eachans)):
        ans = ans*eachans[i]%1000000007

    print(ans)
import sys

def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

X,Y = (int(x) for x in input().split())

if (X+Y) % 3 != 0:
  print(0)
  sys.exit()
  
n = (2*Y-X) / 3
m = (2*X-Y) / 3
if n < 0 or m < 0:
  print(0)
  sys.exit()
  
print(int(cmb(n+m,n)))

### FIXED CODE ###

import sys

def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

X,Y = (int(x) for x in input().split())

if (X+Y) % 3 != 0:
  print(0)
  sys.exit()

if (2*Y-X) % 3 == 0:
  n = (2*Y-X) // 3  
else:
  n = -1

if (2*X-Y) % 3 == 0:
  m = (2*X-Y) // 3
else:
  m = -1

if n < 0 or m < 0:
  print(0)
  sys.exit()
print(int(cmb(n+m,n)) % (10**9 +7))
N = int(input())
Ts = list(map(int, input().split()))
M = int(input())
for i in range(M):
  p, x = map(int, input().split())
  print(sum(Ts)-T[p-1]+x)

### FIXED CODE ###

import copy
N = int(input())
Ts = list(map(int, input().split()))
M = int(input())
for i in range(M):
  P, x = map(int, input().split())
  Ts_2 = copy.copy(Ts) #コピーを行う
  Ts_2[P-1] = x
  print(sum(Ts_2))
A,B,K = input().split()
A=int(A)
B=int(B)
K=int(K)

if K==1:
    if A % 2 ==1:
        A =A-1
    A =A/2
    B=B+A

if K==2:
    if A % 2 ==1:
        A =A-1
    A =A/2
    B=B+A
    if B % 2==1:
        B=B-1
    B=B/2
    A=A+B

if K>=3:
    for i in range(1,K,2):
        if A % 2 ==1:
            A =A-1
        A =A/2
        B=B+A
        if B % 2==1:
            B=B-1
        B=B/2
        A=A+B

    if K%2==1:
        if A % 2 ==1:
            A =A-1
        A =A/2
        B=B+A


print (int(A),int(B))

### FIXED CODE ###

A = input()
chars = list(A)

result ="0"
if len(A)==2:
    result = A
else:
    result= chars[2]+chars[1]+chars[0]

print(result)
n = int(input())
print(800*n -(n%15)＊200)

### FIXED CODE ###

n = int(input())
print(800*n -(n//15)*200)
N,M=map(int,input().split())
ans=[-1]*(N+1)
for i in range(M):
    s,c=map(int,input().split())
    if ans[s]==-1 :
        ans[s]=c
    elif ans[s]==c :
        pass
    else:
        print('-1')
        exit()

if N>=2 and ans[1]==0:
    print('-1')
    exit()    
elif N>=2 and ans[1]==-1: #ここが間違ってた。
    ans[1]==1
elif N==1:
    if ans[1]==-1 0r ans[1]==0:
        print(0)

else:
    pass

for j in range(len(ans)):
    if ans[j] == -1:
        ans[j] = 0

if N==1:
    FA=ans[-1]
elif N==2:
    FA=10*ans[-2]+ans[-1]
else:
    FA=100*ans[-3]+10*ans[-2]+ans[-1]
print(FA)

### FIXED CODE ###

N,M=map(int,input().split())
ans=[-1]*(N+1)
for i in range(M):
    s,c=map(int,input().split())
    if ans[s]==-1 :
        ans[s]=c
    elif ans[s]==c :
        pass
    else:
        print('-1')
        exit()

if N>=2 and ans[1]==0:
    print('-1')
    exit()
elif N>=2 and ans[1]==-1: #ここが間違ってた。
    ans[1]=1
else:
    pass

for j in range(len(ans)):
    if ans[j] == -1:
        ans[j] = 0

if N==1:
    FA=ans[-1]
elif N==2:
    FA=10*ans[-2]+ans[-1]
else:
    FA=100*ans[-3]+10*ans[-2]+ans[-1]
print(FA)
N, K = map(int, input().split())
S = list(input())

S[K-1] = S[K-1].lower()
print(S[0],S[1],S[2], sep="")

### FIXED CODE ###

N, K = map(int, input().split())
S = list(input())

S[K-1] = S[K-1].lower()
print("".join(S))
import re
s=input()
s=s.replace("A","1").replace("C","1").replace("G","1").replace("T","1")
s=list(map(int,re.sub('[A-Z]+', ' ', s).split()))
print(len(str(max(s))))

### FIXED CODE ###

import re
s=input()
s=s.replace("A","1").replace("C","1").replace("G","1").replace("T","1")
s=list(map(int,re.sub('[A-Z]+', ' ', s).split()))
print(0 if s==[] else len(str(max(s))))
la=[]
lb=[]
n=int(input())
kari=[]
tak=0
ao=0
for i in range(n):
    a,b=map(int,input().split())
    la.append(a)
    lb.append(b)
    kari.append(a-b)
while la!=[]:
    if max(kari)+min(kari)>0:
        tak+=la[kari.index(max(kari))]
        kari.remove(max(kari))
        la.remove(la[kari.index(max(kari))])
        lb.remove(lb[kari.index(max(kari))])
    else:
        tak+=la[kari.index(min(kari))]
        kari.remove(min(kari))
        la.remove(la[kari.index(min(kari))])
        lb.remove(lb[kari.index(min(kari))])
    if la==[]:
        break
    if max(kari)+min(kari)>0:
        ao+=la[kari.index(min(kari))]
        kari.remove(max(kari))
        la.remove(la[kari.index(min(kari))])
        lb.remove(lb[kari.index(min(kari))])
    else:
        ao+=la[kari.index(min(kari))]
        kari.remove(max(kari))
        la.remove(la[kari.index(max(kari))])
        lb.remove(lb[kari.index(max(kari))])
print(int(tak-ao))

### FIXED CODE ###

la=[]
lb=[]
n=int(input())
kari=[]
tak=0
ao=0
s=-1
for i in range(n):
    a,b=map(int,input().split())
    la.append(a)
    lb.append(b)
    kari.append(a+b)
    ao+=b
kari.sort()
if n%2==0:
    for v in range(int(n/2)):
        tak+=kari[s]
        s+=-2
else:
    for k in range(int(n/2)+1):
        tak+=kari[s]
        s+=-2
print(tak-ao)
ans = 1
n = input()
a = list(map(int, input().split()))

for i in range(n):
    ans *= a[i]

if ans > 10 ** 18:
    print(-1)
else:
    print(ans)

### FIXED CODE ###

ans = 1
n = input()
a = list(map(int, input().split()))

if 0 in a:
    print(0)
else:
    for i in a:
        ans *= i
        if ans > 10 ** 18:
            print(-1)
            break
    else:
        print(ans)
x,n = map(int, input().split())
l = map(lambda t : int(t)-x, input().split())
p = sorted(map(abs,l))
for i in range(n//2+1):
    if not ( p[i] == p[i+1] ==i ):
        if -i in l:
            print(x+i)
        else:
            print(x-i)

### FIXED CODE ###

x,n,*p=map(int,open(0).read().split())
print(min({*range(999)}-{*p},key=lambda y:abs(y-x)))
a,b = (int(x) for in input().split())
if a > b:
	print(“a > b”)
elif a < b:
	print(“a < b”)
else:
	print(“a == b”)
 


### FIXED CODE ###

a,b = map(int, input().split())
if a > b:
 print("a > b")
elif a < b:
 print("a < b")
else:
 print("a == b")
#C - Skip
N, X = map(int, input().split())
x_list = list(map(int, input().split()))

residual = [abs(x - X) for x in x_list]

def gcd(a,b):
    if(b==0):
        return a
    else:
        return gcd(b, a%b)
        
max_ = 0
for i in range(len(residual)):
    if(i == 0):
        max_ = gcd(residual[i], residual[i+1])
    elif(i == N-1):
        print(max_)
    else:
        max_ = gcd(residual[i], max_)

        

### FIXED CODE ###

#C - Skip
import sys

N, X = map(int, input().split())
x_list = list(map(int, input().split()))

residual = [abs(x - X) for x in x_list]

def gcd(a,b):
    if(b==0):
        return a
    else:
        return gcd(b, a%b)
        
max_ = 0
for i in range(len(residual)):
    if(N==1):
        print(residual[0])
        break
    
    if(i == 0):
        max_ = gcd(residual[i], residual[i+1])
    elif(i == N-1):
        print(max_)
    else:
        max_ = gcd(residual[i], max_)
N = int(input())
A = list(map(int, input().split()))
 
D = defaultdict(int)
for a in A:
    D[a] += 1
 
ans_base = 0
for v in D.values():
    ans_base += v * (v - 1) // 2
 
for a in A:
    print(ans_base - (D[a] * (D[a] - 1) // 2) + ((D[a] - 1) * (D[a] - 2) // 2))

### FIXED CODE ###

from collections import defaultdict
N = int(input())
A = list(map(int, input().split()))

D = defaultdict(int)
for a in A:
    D[a] += 1

ans_base = 0
for v in D.values():
    ans_base += v * (v - 1) // 2

for a in A:
    if D[a] > 1:
        print(ans_base - (D[a] * (D[a] - 1) // 2) + ((D[a] - 1) * (D[a] - 2) // 2))
    else:
        print(ans_base)