Harryxun/stf_run huggingface dataset:
N, M = map(int, input().split())
a = []
tmp = []
for i in range(M):
    tmp = list(map(str,input().split()))
    a.append(list(tmp[0]))

### FIXED CODE ###

H, W = map(int, input().split())
a = []
tmp = []
for i in range(H):
    tmp = list(map(str,input().split()))
    a.append(list(tmp[0]))

for i in range(H):
    for j in range(W):
        if a[i][j] == '#':
            if j - 1 >= 0 and a[i][j - 1] == "#":
                continue
            elif j + 1 < W and a[i][j + 1] == "#" :
                continue
            elif i + 1 < H and a[i + 1][j] == "#" :
                continue
            elif i - 1 >= 0 and a[i - 1][j] == "#":
                continue
            else:
                print("No")
                exit()
 
print("Yes")
print(int(input() ** 2)

### FIXED CODE ###

a = int(input())
print(a ** 3)
N,K = int(input().split())
print(int(K*((K-1)**(N-1))))

### FIXED CODE ###

N,K = map(int,input().split())
print(int(K*(K-1)**(N-1)))
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
a.sort()
b.sort()
c.sort()
i,j,k=0
ans+=1
while i<n and j<n and k<n:
  while j<n and a[i]>=b[j]:
    j+=1
  if j==n:
    break
  while k<n and b[j]>=c[k]:
    k+=1
  if k==n:
    break
  ans+=1
  i+=1
  j+=1
  k+=1
print(ans)


### FIXED CODE ###

import bisect
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
a.sort()
b.sort()
c.sort()
ans=0
for i in range(n):
  j=bisect.bisect_left(a,b[i])
  k=n-bisect.bisect_right(c,b[i])
  ans+=j*k
print(ans)
a,b = map(int, input().split())
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")
def main():
    s=input()
    x,y=map(int,input().split())

    lf = [0]
    tf = 0
    for i in range(len(s)):
        if s[i] =="F":
            lf[tf] += 1
        else:
            lf.append(0)
            tf += 1

    lx = [lf[i] for i in range(len(lf)) if i % 2 == 0]
    ly = [lf[i] for i in range(len(lf)) if i % 2 == 1]
    dpxcenter = sum(lx)
    dpxedge = dpxcenter*2+10
    dpx = [[False for _ in range(dpxedge)] for _ in range(len(lx)+1)]
    dpx[1][dpxcenter+lx[0]+5] = True
    for i in range(1,len(lx)):
        for j in range(dpxedge):
            if j-lx[i] >= 0:
                dpx[i+1][j] = dpx[i][j-lx[i]]
            if j+lx[i] < dpxedge:
                dpx[i+1][j] = dpx[i+1][j] or dpx[i][j+lx[i]]

    dpycenter = sum(ly)
    dpyedge = dpycenter*2+10
    dpy = [[False for _ in range(dpyedge)] for _ in range(len(ly)+1)]
    dpy[0][dpycenter+5] = True
    for i in range(len(ly)):
        for j in range(dpyedge):
            if j-ly[i] >= 0:
                dpy[i+1][j] = dpy[i][j-ly[i]]
            if j+ly[i] < dpyedge:
                dpy[i+1][j] = dpy[i+1][j] or dpy[i][j+ly[i]]

    if dpx[-1][x+dpxcenter+5] and dpy[-1][y+dpycenter+5]:return "Yes"
    else:return "No"

print(main())

### FIXED CODE ###


def main():
    s=input()
    x,y=map(int,input().split())

    lf = [0]
    tf = 0
    for i in range(len(s)):
        if s[i] =="F":
            lf[tf] += 1
        else:
            lf.append(0)
            tf += 1

    lx = [lf[i] for i in range(len(lf)) if i % 2 == 0]
    ly = [lf[i] for i in range(len(lf)) if i % 2 == 1]
    dpxcenter = sum(lx)
    if abs(x)>dpxcenter: return "No"
    dpxedge = dpxcenter*2+20
    dpx = [[False for _ in range(dpxedge)] for _ in range(len(lx)+1)]
    dpx[1][dpxcenter+lx[0]+10] = True
    for i in range(1,len(lx)):
        for j in range(dpxedge):
            if j-lx[i] >= 0:
                dpx[i+1][j] = dpx[i][j-lx[i]]
            if j+lx[i] < dpxedge:
                dpx[i+1][j] = dpx[i+1][j] or dpx[i][j+lx[i]]

    dpycenter = sum(ly)
    if abs(y)>dpycenter: return "No"
    dpyedge = dpycenter*2+20
    dpy = [[False for _ in range(dpyedge)] for _ in range(len(ly)+1)]
    dpy[0][dpycenter+10] = True
    for i in range(len(ly)):
        for j in range(dpyedge):
            if j-ly[i] >= 0:
                dpy[i+1][j] = dpy[i][j-ly[i]]
            if j+ly[i] < dpyedge:
                dpy[i+1][j] = dpy[i+1][j] or dpy[i][j+ly[i]]

    if dpx[-1][x+dpxcenter+10] and dpy[-1][y+dpycenter+10]:return "Yes"
    else:return "No"

print(main())
N, K = map(int, input().split())
logs = list(map(int, input().split()))
maxL = max(logs)

def binsearch(minz, maxz):
    if minz >= maxz:
        return minz

    mid = (maxz + minz)//2
    ncut = 0
    for i in range(N):
        thiscut = int((logs[i] + mid - 1)/mid) - 1
        ncut += thiscut
        if ncut > K:
            return binsearch(mid, maxz)

    if ncut < K:
        return binsearch(minz, mid)
    #else ncut == K
    maxx = 0
    for i in range(N):
        thiscut = int((logs[i] + mid - 1)/mid) - 1
        thislen = int((logs[i] + thiscut)/(thiscut+1))
        if maxx < thislen: maxx = thislen
    return maxx

if K > 0:
    ans = binsearch(1, maxL+1)
else:
    ans = maxL
print(ans)


### FIXED CODE ###

N, K = map(int, input().split())
logs = list(map(int, input().split()))
maxL = max(logs)

def binsearch(minz, maxz):
    if minz >= maxz:
        return minz

    mid = (maxz + minz)//2
    ncut = 0
    for i in range(N):
        thiscut = int((logs[i] + mid - 1)/mid) - 1
        ncut += thiscut
        if ncut > K:
            return binsearch(mid+1, maxz)

    if ncut < K:
        return binsearch(minz, mid)
    #else ncut == K
    maxx = 0
    for i in range(N):
        thiscut = int((logs[i] + mid - 1)/mid) - 1
        thislen = int((logs[i] + thiscut)/(thiscut+1))
        if maxx < thislen: maxx = thislen
    return maxx

if K > 0:
    ans = binsearch(1, maxL+1)
else:
    ans = maxL
print(ans)
import math
n=int(input())
a=list(map(int, input().split()))
ans = a[0]
for i in range(1, n):
    ans = math.gcd(ans, a[i])
print(ans)

### FIXED CODE ###

import fractions
n=int(input())
a=list(map(int, input().split()))
ans = a[0]
for i in range(1, n):
    ans = fractions.gcd(ans, a[i])
print(ans)
N,M = [int(i) for i in input().split()]
A = []
for _ in range(M):
    A.append(int(input()))
def fibo(n):
    if n <= 2:
        return n
    return fibo(n-1) + fibo(n-2)
cnt = 1
for a in range(len(A)+1):
    if a == 0:
        if A[a] == 1:
            width = 1
        else:
            width = A[a]-2
    elif a > 0 and a < M:
        width = A[a] - A[a-1] - 2
    elif a == (M):
        width = N-A[a-1]-1
    if width < 0:
        tmp = 0
        cnt = 0
        break
    else:
        tmp = fibo(width) % 1000000007
    cnt *= tmp
print(cnt)

### FIXED CODE ###

mod = 1000000007
N,M = [int(i) for i in input().split()]
A = []
for _ in range(M):
    A.append(int(input()))
steps = [0]*N
for a in A:
    steps[a-1] = 1
cnt = []
for n in range(N):
    if n == 0:
        if steps[n]==0:
            cnt.append(1)
        elif steps[n]==1:
            cnt.append(0)
    elif n == 1:
        if steps[n]==0:
            cnt.append(cnt[n-1]+1)
        elif steps[n]==1:
            cnt.append(0)
    elif steps[n] == 0:
        cnt.append((cnt[n-2]+cnt[n-1])%mod)
    elif steps[n] == 1:
        cnt.append(0)
print(cnt[-1])
a,b=map(int,input()split())
print(min(abs(a-b),abs(a+b)+1))

### FIXED CODE ###

a,b=map(int,input().split())
print(min(max(b-a,-b+a+2),abs(a+b)+1))
s = list(input())

bl = True

if s[0] != 'A':
    bl = False
if s[2:len(s)-1].count('C') != 1:
    bl = False
if s[0] != 'A' and s[2:len(s)-1].count('C') != 1:
    s.remove('A')
    s[2:len(s)-1].remove('C')
    if s not in 'abcdefghijkrmnopqlstuvwxyz':
        bl = False

print('AC' if bl else 'WA')


### FIXED CODE ###

s = list(input())

bl = False
s1 = s[1]
s2 = s[2:len(s)-1]
s3 = s[-1]

if s[0] == 'A' and s[2:len(s)-1].count('C') == 1:
    s2.remove('C')
    s2 = ''.join(s2)
    ss = s1+s2+s3
    if ss.islower():
        bl = True

print('AC' if bl else 'WA')
x, y, z = map(int, input()split())
print(z, x, y)

### FIXED CODE ###

x, y, z = map(int, input().split())
print(z, x, y)
import math

def overlap(p1, p2, d):
    return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d**2

def intersection(o1,o2):
    a  = 2*(o2[0] - o1[0])
    b  = 2*(o2[1] - o1[1])
    c  = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
    a2 = a**2 + b**2
    b2 = a*c + a*b*o1[1] - b**2*o1[0]
    c2 = b**2*(o1[0]**2 + o1[1]**2 - 1) + c**2 + 2*b*c*o1[1]
    x1 = (-b2 + math.sqrt(b2**2 - a2*c2))/a2
    x2 = (-b2 - math.sqrt(b2**2 - a2*c2))/a2
    if abs(b) == 0:
        y1 = o1[1] + math.sqrt(1 - (x1 - o1[0])**2)
        y2 = o1[1] - math.sqrt(1 - (x1 - o1[0])**2)
    else:
        y1 = -(a*x1 + c)/b
        y2 = -(a*x2 + c)/b
    return [x1, y1], [x2, y2]

while True:
    n = int(input())
    if n == 0:
        break
    p = []
    for i in range(n):
        p.append(list(map(float, input().split(","))))
    ans = 1
    for i in range(n - 1):
        for j in range(i + 1, n):
            if not overlap(p[i], p[j], 2):
                continue
            p1, p2 = intersection(p[i], p[j])
            cnt1 = 0
            cnt2 = 0
            for k in range(n):
                if overlap(p1, p[k], 1):
                    cnt1 += 1
                if overlap(p2, p[k], 1):
                    cnt2 += 1
            ans = max([ans, cnt1, cnt2])
    print(ans)



### FIXED CODE ###

import math

def dist(p1, p2):
    return math.sqrt((p1[0] - p2[0])**2 + (p1[1] - p2[1])**2)

def intersection(o1,o2):
    if dist(o1,o2) > 2:
        p1, p2 =  [None, None], [None, None]
    elif dist(o1,o2) == 2:
        p1, p2 =  [(o1[0] + o2[0])/2, (o1[1] + o2[1])/2], [None, None]
    else:
        m = [(o1[0] + o2[0])/2, (o1[1] + o2[1])/2]
        v = [m[0] - o1[0], m[1] - o1[1]]
        v_abs = dist(v,[0,0])
        w = [v[1], -v[0]]
        w_abs = dist(w,[0,0])
        n = [w[0]/w_abs, w[1]/w_abs]
        l = math.sqrt(1 - v_abs**2)
        p1 = [m[0] + l*n[0], m[1] + l*n[1]]
        p2 = [m[0] - l*n[0], m[1] - l*n[1]]
    return p1, p2
err = 1.0e-6
while True:
    n = int(input())
    if n == 0:
        break
    p = []
    for i in range(n):
        p.append(list(map(float, input().split(","))))
    ans = 1
    for i in range(n - 1):
        for j in range(i + 1, n):
            p1, p2 = intersection(p[i], p[j])
            cnt1 = 0
            cnt2 = 0
            for k in range(n):
                if p1[0] and dist(p1, p[k]) <= 1 + err:
                    cnt1 += 1
                if p2[0] and dist(p2, p[k]) <= 1 + err:
                    cnt2 += 1
            ans = max([ans, cnt1, cnt2])
    print(ans)
S = []
H = []
C = []
D = []
for i in (S, H, C, D):
        for k in range(1, 13+1):
            i.append(k)


for u in range(0, int(input())):
    x, y = (i for i in input().split())
    if x == "S":
        S.remove(int(y))
    elif x == "H":
        H.remove(int(y))
    elif x == "C":
        H.remove(int(y))
    else:
        D.remove(int(y))
if len(S) > 0:
    for s in range(0, len(S)):
        print("S",S[s])
if len(H) > 0:
    for h in range(0, len(H)):
        print("H",H[h])
if len(C) > 0:
    for c in range(0, len(C)):
        print("C",C[c])
if len(D) > 0:
    for d in range(0, len(D)):
        print("D",D[d])

### FIXED CODE ###

date = [
    "{0} {1}".format(s,r)
    for s in ('S', 'H', 'C', 'D')
    for r in range(1,13+1)
    ]

count= int(input())
for c in range(count):
    card = input()
    date.remove(card)

for c in date:
    print(c)
def main():
    N, A, B, C = map(int, input().split())
    ls = [int(input()) for _ in range(N)]

    tmp = []
    from itertools import permutations
    for a, b, c in permutations([A, B, C]):
        x = f(N, a, b, c, ls)
        tmp.append(x)

    ans = min(tmp)
    print(ans)


def f(N, A, B, C, ls):
    """
    A,B,Cそれぞれが存在していたら終了
    存在しない場合
    diff をとる
        diffと合成するしないでの最善
    ABCの順に依存するが、3つしかないので 3P3=6通り
    N_max=8 よりゴリ押し
    """
    ls = ls[:]
    abc = [A, B, C]

    ans = 0
    for x in abc[:]:
        if x in ls:
            abc.remove(x)
            ls.remove(x)

    while abc:
        x = abc[0]
        diffs = [l - x for l in ls]
        # print(abc, ans, ls, diffs)
        # 完全一致
        if x in ls:
            ls.remove(x)
            abc.remove(x)
            continue

        # 合成コスト以下, sortedで試してたけどmin のkey指定でよかった
        i, diff = min(enumerate(diffs), key=lambda a: abs(a[0]))
        min_cost = abs(diff)
        if min_cost <= 10:
            ans += min_cost
            del ls[i]
            del abc[0]
            continue

        # 合成できない
        if len(ls) < 2:
            ans += abs(ls[0] - x)
            abc.remove(x)
            del ls[0]
            continue

        # 合成
        comb = []
        n_ls = len(ls)
        for i in range(n_ls):
            for j in range(i+1, n_ls):
                comb.append((i, j, ls[i] + ls[j]))

        # 合成前後のコスト比較
        i, j, new_l = min(comb, key=lambda b: abs(b[2] - x))
        # print("\t", [c[2] for c in comb])
        # print("\t", i, j, new_l, min_cost)
        cost = abs(x - new_l)
        if cost >= min_cost:
            del_idx = min(i, j, key=lambda idx: abs(ls[idx]) - x)
            ans += min_cost
            del ls[del_idx]
            del abc[0]
        else:
            ls[i] = new_l
            del ls[j]
            ans += 10

    return ans


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    N, A, B, C = map(int, input().split())
    ls = [int(input()) for _ in range(N)]

    ans = editorial(N, A, B, C, ls)
    print(ans)


def editorial(N, A, B, C, ls):
    def dfs(cur, a, b, c):
        if cur == N:
            if min([a, b, c]) > 0:
                # 使わなくて足りない/使いすぎて超過している分は差引すればいい
                tmp = abs(a - A) + abs(b - B) + abs(c - C) - 30
            else:
                tmp = float("inf")
            # print(tmp, a, b, c, sep="\t")
            return tmp

        # 使うか使わないか,合成パターンを試す
        d = ls[cur]
        ret0 = dfs(cur + 1, a, b, c)
        ret1 = dfs(cur + 1, a + d, b, c) + 10
        ret2 = dfs(cur + 1, a, b + d, c) + 10
        ret3 = dfs(cur + 1, a, b, c + d) + 10

        return min([ret0, ret1, ret2, ret3])

    ans = dfs(0, 0, 0, 0)
    return ans


if __name__ == '__main__':
    main()
for i in range(3):
    line = input().rstrip().split(' ')
    array_1.append(line)

bool_array = []
for i in range(3):
    tmp = []
    for j in range(3):
        tmp.append(False)
    bool_array.append(tmp)
num = int(input().rstrip())
for i in range(num):
    input_line = input().rstrip()
    for j in range(3):
        for k in range(3):
            if array_1[j][k] == input_line:
                bool_array[j][k] = True

ans = "No"
for i in range(3):
    if bool_array[i][0] and bool_array[i][1] and bool_array[i][2]:
        ans = 'Yes'

    if bool_array[0][i] and bool_array[1][i] and bool_array[2][i]:
        ans = 'Yes'

if bool_array[0][0] and bool_array[1][1] and bool_array[2][2]:
    ans = 'Yes'

if bool_array[0][2] and bool_array[1][1] and bool_array[2][0]:
    ans = 'Yes'
print(ans)


### FIXED CODE ###

array_1 = []
for i in range(3):
    line = input().rstrip().split(' ')
    array_1.append(line)
    
# print(array_1)

bool_array = []
for i in range(3):
    tmp = []
    for j in range(3):
        tmp.append(False)
    bool_array.append(tmp)

# print(bool_array)

num = int(input().rstrip())
for i in range(num):
    input_line = input().rstrip()
    for j in range(3):
        for k in range(3):
            if array_1[j][k] == input_line:
                bool_array[j][k] = True

ans = "No"
for i in range(3):
    if bool_array[i][0] and bool_array[i][1] and bool_array[i][2]:
        ans = 'Yes'

for i in range(3):
    if bool_array[0][i] and bool_array[1][i] and bool_array[2][i]:
        ans = 'Yes'

if bool_array[0][0] and bool_array[1][1] and bool_array[2][2]:
    ans = 'Yes'

if bool_array[0][2] and bool_array[1][1] and bool_array[2][0]:
    ans = 'Yes'
    
    
print(ans)
N=input()
N=int(N)
S=[0]*N
for i in range(N):
    S[i]=input()

M=input()
M=int(M)
T=[0]*M
for i in range(M):
    T[i]=input()

A=[]
for i in S:
    A.append(S.count(i)-T.count(i))

print(max(*A,0))

### FIXED CODE ###

N=input()
N=int(N)
S=[0]*N
for i in range(N):
    S[i]=input()

M=input()
M=int(M)
T=[0]*M
for i in range(M):
    T[i]=input()

A=[]
for i in S:
    A.append(S.count(i)-T.count(i))

print(max(0,max(A)))
n=int(input())
if n < 10 :
    print(n)
else:
    n=list(str(n))
    key=0
    for i in range(n):
        if n[1+i]!="9":
            key=1
    if key ==0:
        print((len(n)-1)*9+int(n[0]))
    else:
        print((len(n)-1)*9+int(n[0])-1)




### FIXED CODE ###

n=int(input())
if n < 10 :
    print(n)
else:
    n=list(str(n))
    key=0
    for i in range(len(n)-1):
        if n[1+i]!="9":
            key=1
    if key ==0:
        print((len(n)-1)*9+int(n[0]))
    else:
        print((len(n)-1)*9+int(n[0])-1)
N=int(input())
xy=[list(map(int,input().split())) for _ in [0]*N]

pq = dict()
for i in range(N):
    for j in range(N):
        if i==j:continue
        p = xy[i][0] - xy[j][0]
        q = xy[i][1] - xy[j][1]
        pq[(p,q)] = pq.get((p,q),0)+1

print(N - max(pq.values()))

### FIXED CODE ###

N=int(input())
xy=[list(map(int,input().split())) for _ in [0]*N]

pq = {0:0}
for i in range(N):
    for j in range(N):
        if i==j:continue
        p = xy[i][0] - xy[j][0]
        q = xy[i][1] - xy[j][1]
        pq[(p,q)] = pq.get((p,q),0)+1

print(N - max(pq.values()))
def solve():
    def dfs(tree, n, ans):
        for i in tree[n]:
            ans[i] += ans[n]
            tree[i].remove(n)
            dfs(tree, i, ans) #再帰関数になっている。次の木の中を探索
     
    n, q = map(int,input().split())
    ab = [list(map(int,input().split())) for _ in range(n-1)]
    px = [list(map(int,input().split())) for _ in range(q)]
     
    g = [[] for _ in range(n)]
    for i in range(n-1):
        g[ab[i][0]-1].append(ab[i][1]-1)
        g[ab[i][1]-1].append(ab[i][0]-1)
    
    ans = [0]*n
    for i in range(q):
        ans[px[i-1][0]-1] += px[i-1][1]
    dfs(g, 0, ans)
     
    print(*ans)
    
if __name__ == "__main__":
    solve()

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
def dfs(tree, n, ans):
    for i in tree[n]:
        ans[i] += ans[n]
        tree[i].remove(n)
        dfs(tree, i, ans)
 
n, q = map(int,input().split())
ab = [list(map(int,input().split())) for _ in range(n-1)]
px = [list(map(int,input().split())) for _ in range(q)]
 
g = [[] for _ in range(n)]
for i in range(n-1):
    g[ab[i][0]-1].append(ab[i][1]-1)
    g[ab[i][1]-1].append(ab[i][0]-1)
 
ans = [0]*n
for i in range(q):
    ans[px[i-1][0]-1] += px[i-1][1]
dfs(g, 0, ans)
 
print(*ans)
from collections import deque

gem,ope = map(int,input().split())
vlist = deque(map(int,input().split()))

ans = 0

for l in range(ope+1):
  for r in range(ope-l+1):
    if l+r > ope:
      break

    x   = ope-l-r
    now = []
    deq = vlist.copy() 

    for i in range(l):
      now.append(deq.popleft())
    for j in range(r):
      now.append(deq.pop())
    for k in range(x):
      if now==[]:
        break
      if min(now)<0:
        now.remove(min(now))
    
    if ans<sum(now):
      ans = sum(now)

print(ans)


### FIXED CODE ###

# import itertools
# import pprint
import copy
from collections import deque

gem,ope = map(int,input().split())
vlist = deque(map(int,input().split()))

ans = 0

for l in range(ope+1):
  for r in range(ope-l+1):
    if l+r>ope or l+r>gem:
      break

    x   = ope-l-r
    now = []
    deq = copy.copy(vlist) 

    for i in range(l):
      now.append(deq.popleft())
    for j in range(r):
      now.append(deq.pop())
    for k in range(x):
      if now==[]:
        break
      if min(now)<0:
        now.remove(min(now))
    
    if ans<sum(now):
      ans = sum(now)

print(ans)
S1,S2,S3=map(input().split())
print(count"1")

### FIXED CODE ###

print(input().count("1"))
def merge(A, left, mid, right):
    n1 = mid-left
    n2 = right-mid
    L = [0 for i in range(n1)]
    R = [0 for i in range(n2)]
    for i in range(n1):
        L[i] = A[left+i]
    for i in range(n2):
        R[i] = A[mid+i]
    L[n1] = inf
    R[n2] = inf
    i = 0
    j = 0
    for k in range(left, right):
        if L[i] <= R[j]:
            A[k] = L[i]
            i = i+1
        else:
            A[k] = R[j]
            j = j+1
    global cnt
    cnt += 1
def mergeSort(A, left, right):
     if left+1 < right:
         mid = (left+right) / 2
         mergeSort(A, left, mid)
         mergeSort(A, mid, right)
         merge(A, left, mid, right)

n = input()
A = list(map(int, input().split()))
cnt = 0
mergeSort(A, 0, len(A))
print(*A)
print(str(cnt))

### FIXED CODE ###

def merge(A, left, mid, right):

    n1 = mid-left
    n2 = right-mid
    #L = [0 for i in range(n1+1)]
    #R = [0 for i in range(n2+1)]
    #for i in range(n1):
    #    L[i] = A[left+i]
    #for i in range(n2):
    #    R[i] = A[mid+i]
    L = A[left:mid]
    R = A[mid:right]
    L.append(float('inf'))
    R.append(float('inf'))
    i = 0
    j = 0
    global cnt

    for k in range(left, right):
        cnt += 1
        if L[i] <= R[j]:
            A[k] = L[i]
            i = i+1
        
        else:
            A[k] = R[j]
            j = j+1
    return cnt

def mergeSort(A, left, right):
    if left+1 < right:
         mid = (left+right) // 2
         mergeSort(A, left, mid)
         mergeSort(A, mid, right)
         merge(A, left, mid, right)
    else:
        return 0

n = input()
A = list(map(int, input().split()))
cnt = 0
mergeSort(A, 0, len(A))
print(*A)
print(str(cnt))
a,b,c=map(float,input().split())
from math import sqrt
def fl(x):
    digits = 9
    form = '%.'+str(digits-1)+'e'
    return float((form % x))
def int_sqrt2(n):
    def f(prev):
        while True:
            m = (prev + n / prev) / 2
            if m >= prev:
                return prev
            prev = m
    
    return f(int(sqrt(n) * (1 + 1e-10)))
if float(fl(a)*fl(b))<int_sqrt2(float(fl(fl(c-a)-b))/float(2)):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

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

if c-a-b <= 0:
    print("No")
elif 4*a*b < (c-a-b)**2:
    print("Yes")
else:
    print("No")
input = int(X)
if X >= 30:
  return 'Yes'
else:
  return 'No'


### FIXED CODE ###

X = int(input())
if(X >= 30):
  print('Yes')
else:
  print('No')
import sys

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

if 7 in [a,b,c]:
  if filter(lambda x:x ==5,[a,b,c]) is 2:
  	print("YES")
    sys.exit()

print("NO")

### FIXED CODE ###

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



count = 0
for i in l:
	if i == 5:
		count += 1
		
		if count == 2:
			break

if any([i == 7 for i in l]) and count == 2:
	print("YES")
else:
	print("NO")
a= int(intpu().replace(" ",""))

print("Yes" if a == int(a**.5)**2 else "No")

### FIXED CODE ###

a= int(input().replace(" ",""))

print("Yes" if a == int(a**.5)**2 else "No")
n, m = map(int, input().split())
sc = [list(map(int, input().split())) for _ in range(m)]

if n == 1:
  for i in range(10):
    i = str(i)
    for s, c in sc:
      if i == str(c):
        flag = True 
      else:
        flag = False
        break 
    if flag:
      print(''.join(i))
      exit()

for i in range(10**(n-1), 1000):
  i = list(str(i))
  flag = False
  for s,c in sc:
    if i[s-1] == str(c):
      flag = True
    else:
      flag = False
      break
  if flag:
    print(''.join(i))
    exit()

print('-1')

### FIXED CODE ###

N, M = map(int, input().split())
sc = [list(map(int, input().split())) for _ in range(M)]
for i in range(0, 1000):
  i = str(i)
  flag = True
  if len(i) != N:
    continue
  for s, c in sc:
    #print(i, s, len(i))
    if len(list(i)) < s:
      flag = False
      break
    if i[s-1] != str(c):
      flag = False
      break
  if flag:
    print(i)
    exit()

print(-1)
S=map(int,input().split())
print(max(0,S[0]-S[1]))

### FIXED CODE ###

S=list(map(int,input().split()))
print(max(0,S[0]-S[1]))