Harryxun/stf_run huggingface dataset:
n = int(input())
s = [int(input()) for i in range(n)]
 
print("AC x " +  str(s.count('AC')))
print("WA x " +  str(s.count('WA')))
print("TLE x " +  str(s.count('TLE')))
print("RE x " +  str(s.count('RE')))

### FIXED CODE ###

n = int(input())
s = [input() for i in range(n)]
 
print("AC x " +  str(s.count('AC')))
print("WA x " +  str(s.count('WA')))
print("TLE x " +  str(s.count('TLE')))
print("RE x " +  str(s.count('RE')))
import sys

while True:
    n = sys.stdin.readline()[:-1]

    if n = '-1 -1 -1':
        break

    marks = [ int(m) for m in n.split() ]

    mt_points,retest = marks[0] + marks[1],marks[2]

    if -1 in marks[:-1]:
        print('F')
        continue
    elif mt_points >= 80:
        print('A')
        continue
    elif mt_points >= 65 and 80 > mt_points:
        print('B')
        continue
    elif mt_points >= 50 and 65 > mt_points:
        print('C')
        continue
    elif mt_points >= 30 and 50 > mt_points:
        if retest >= 50:
            print('C')
            continue
        print('D')
        continue
    elif 30 > mt_points:
        print('F')


### FIXED CODE ###

import sys

while True:
    n = sys.stdin.readline()[:-1]

    if n == '-1 -1 -1':
        break

    marks = [ int(m) for m in n.split() ]

    mt_points,retest = marks[0] + marks[1],marks[2]

    if -1 in marks[:-1]:
        print('F')
        continue
    elif mt_points >= 80:
        print('A')
        continue
    elif mt_points >= 65 and 80 > mt_points:
        print('B')
        continue
    elif mt_points >= 50 and 65 > mt_points:
        print('C')
        continue
    elif mt_points >= 30 and 50 > mt_points:
        if retest >= 50:
            print('C')
            continue
        print('D')
        continue
    elif 30 > mt_points:
        print('F')
from sys import stdin
D,N=[int(x) for x in stdin.readline().rstrip().split()]
if N%100=0:
  ans=100**D*(N+1)
else:
  if D==0:
      ans=N
  else:
      ans=100**D*N
print(ans)

### FIXED CODE ###

from sys import stdin
D,N=[int(x) for x in stdin.readline().rstrip().split()]
if N%100==0:
  ans=100**D*(N+1)
else:
  if D==0:
      ans=N
  else:
      ans=100**D*N
print(ans)
n = int(input())
a = int(input())
b = int(input())
c = a+b
print("Hello World" if n == 1 else c)

### FIXED CODE ###

n = int(input())
if n == 1:
    print("Hello World")
else:
    a = int(input())
    b = int(input())
    print(a+b)
N,X=map(int,input().split())
list=list(map(int,input().split()))
sum=0
cnt=1
for i in range(N+1):
    sum+=list[i]
    if sum <=X:
        cnt+=1
    else:
        break
print(cnt)


### FIXED CODE ###

N,X=map(int,input().split())
list=list(map(int,input().split()))
sum=0
cnt=1
for i in range(N):
    sum+=list[i]
    if sum <=X:
        cnt+=1
    else:
        break
print(cnt)
while 1:
    m,f,r=map(int,raw_input().split())
    #m:Midterm exam  f:final exam r:Retest
    score=m+f
    if m == -1 or f == -1 :
        print 'F'
        if r == -1 :    
            break
    else :
        if score >= 80:
            print 'A'
        else:
            if score >= 65:
                print 'B'
            else:
                if score >= 50 or (score >= 30 and r >= 50):
                    print 'C'
                else:
                    if score >= 30:
                        print 'D'
                    else:
                        print 'F'

### FIXED CODE ###

while 1:
    m,f,r=map(int,raw_input().split())
    #m:Midterm exam  f:final exam r:Retest
    score=m+f
    if m == -1  or  f ==  -1 :
        if m == -1 and f == -1 and r == -1 :
            break
        else: print 'F'
    elif score >= 80:
        print 'A'
    elif score >= 65:
        print 'B'
    elif score >= 50 or (score >= 30 and r >= 50):
        print 'C'
    elif score >= 30:
        print 'D'
    else:
        print 'F'
MOD = 10 ** 9 + 7
n, m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))

# 前計算
for i in range(n - 1):
    x[i] = x[i + 1] - x[i]

for i in range(m - 1):
    y[i] = y[i + 1] - y[i]

N = [n - 1]
for i in range(n - 3, 0, -2):
    N.append(N[-1] + i)
    # N.append((N[i] + (n - 1 - 2 * (i + 1))) % MOD)

M = [m - 1]
for i in range(m - 3, 0, -2):
    M.append(M[-1] + i)
    # M.append((M[i] + (m - 1- 2 * (i + 1))) % MOD)

if N[0] % 2 == 0:
    N += N[::-1]
elif N[0] != 1:
    N += N[1::-1]

if M[0] % 2 == 0:
    M += M[::-1]
elif M[0] != 1:
    M += M[1::-1]

# print (x)
# print (y)
# print (N)
# print (M)

if len(x) - 1 > len(N):
    while True:
        pass

if len(y) - 1 > len(M):
    while True:
        pass


X_sum = 0
for i in range(n - 1):
    X_sum += x[i] * N[i]
    X_sum %= MOD

Y_sum = 0
for i in range(m - 1):
    Y_sum += y[i] * M[i]
    Y_sum %= MOD

print ((X_sum * Y_sum) % MOD)

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 9)
MOD = 10 ** 9 + 7

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

if (b - a == c - b):
    print ('YES')
else:
    print ('NO')
n = int(input())
record = [ [ [ [0 for r in range(10)] for f in range(3)] ] for b in range(4)]
for i in range(n):
    b,f,r,v = [int(a) in input().split(" ")]
    record[b - 1][f - 1][r - 1] += v
for b in range(4):
    for f in record[b]:
        print( " ".join([str(x) for x in f])
   if b != 3:
        print("#" * 20)
        

### FIXED CODE ###

n = int(input())
record = [ [ [0 for r in range(10)] for f in range(3)] for b in range(4)]
for _ in range(n):
    b,f,r,v = [int(i) for i in input().split(" ")]
    record[b - 1][f - 1][r - 1] += v
for b1 in range(4):
    for f in record[b1]:
        print(" "+" ".join([str(x) for x in f]))
    if b1 != 3:
        print("#" * 20)
import math
from functools import reduce
def gcd(numbers):
    return reduce(math.gcd, numbers)

N = int(input())
A = list(map(int,input().split()))
answer = gcd(A)
print(answer)

### FIXED CODE ###

from fractions import gcd
from functools import reduce

def gcd_list(numbers):
    return reduce(gcd, numbers)

N = int(input())
A = list(map(int,input().split()))
answer = gcd_list(A)
print(answer)
s = input().split()
 
num = int(s[0])
 
#num
 
num2 = int(s[1]*100)
 
#num2
ans = num*num2//100

print(ans)

### FIXED CODE ###

s = input().split()
 
num = int(s[0])
 
#num
 
num2 = int(s[1].replace('.', ''))
 
#num2
ans = (num*num2)//100
 
print(ans)
import sys
input = sys.stdin.readline
N = int(input())
if N == 1:
    print(100)
    print(100)
    exit()
node = [0 for i in range(N)]
neigh = [[] for j in range(N)]
ans = [0 for i in range(N)]
visited = [0 for i in range(N)]
k = 1

for i in range(N-1):
    ai,bi = map(int,input().split())
    node[ai-1] += 1
    node[bi-1] += 1
    neigh[ai-1].append(bi-1)
    neigh[bi-1].append(ai-1)
c = list(map(int,input().split()))
c.sort(reverse=True)
def dfs(neighbor,start,visited):
    global k
    global c
    if sum(visited) == N:
        return 0
    for i in neighbor[start]:
        if visited[i] == 0:
            ans[i] = c[k]
            k += 1
            visited[i] = 1
            dfs(neighbor,i,visited)
        else:
            continue
    return 0
m = max(node)
nn = node.index(m)
visited[nn] = 1
ans[nn] = max(c)

dfs(neigh,nn,visited)
ans2 = ' '.join([str(ans[i]) for i in range(N)])
print(sum(c)-max(c))
print(ans2)


### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
N = int(input())


node = [0 for i in range(N)]
neigh = [[] for j in range(N)]
ans = [0 for i in range(N)]
visited = [0 for i in range(N)]
k = 1

for i in range(N-1):
    ai,bi = map(int,input().split())
    node[ai-1] += 1
    node[bi-1] += 1
    neigh[ai-1].append(bi-1)
    neigh[bi-1].append(ai-1)
c = list(map(int,input().split()))
c.sort(reverse=True)
flag = False
def dfs(neighbor,start):
    global flag
    global k
    if sum(visited) == N:
        return 0

    for i in neighbor[start]:
        
        if visited[i] == 0:
            ans[i] = c[k]
            k += 1
            visited[i] = 1
            try:
                dfs(neighbor,i)
            except RuntimeError:
                flag = True
                return 0




m = max(node)
nn = node.index(m)
#nn = [node[i] for i in range(N) if node[i] == m][0]
visited[nn] = 1
ans[nn] = max(c)

dfs(neigh,nn)
"""
if flag:
    print(100)
    print(' '.join([str(i) for i in range(N)]))
    exit()
"""
ans2 = ' '.join([str(ans[i]) for i in range(N)])


print(sum(c)-max(c))
print(ans2)
##D
a,b,x = map(int,input().split())

import math
if x >= a*a*b/2:
    y = 2*(a*a*b-x)/(a*a) 
    atan1 = 90-math.degrees(math.atan(a/y))
else:
    y = 2*x/(a*b)
    atan1 = math.degrees(math.atan(b/y))
print(atan1)


### FIXED CODE ###

##D
a,b,x = map(int,input().split())

import math
if x >= a*a*b/2:
    y = 2*(a*a*b-x)/(a*a)
    if y == 0:
        atan1 = 0
    else:
        atan1 = 90-math.degrees(math.atan(a/y))
else:
    y = 2*x/(a*b)
    if y == 0:
        atan1 = 0
    else:
        atan1 = math.degrees(math.atan(b/y))
print(atan1)
import numpy as np
import collections
N,K=map(int, input().split())
A =list(map(int,input().split()))
MOD = 10 ** 9 + 7

if N==K:
  ans0 = 1
  for a in A[0:N]:
    ans0 *= a
    ans0 %= MOD
  print(ans0)
  exit()
A=sorted(A)  
if (K%2==1 and A[-1]<0):
  ans1 = 1
  for a in A[N-K:N]:
    ans1 *= a
    ans1 %= MOD
  print(ans1)
  exit()

A=sorted(A, key=lambda x:abs(x), reverse=True)
AA=[np.sign(i) for i in A]

ansA = 1
for a in A[0:K]:
  ansA *= a
  ansA %= MOD
ansAA = AA[0:K].count(-1)%2

if ansAA=0:
  print(ansA)
  exit()

B=sorted(A[K-1:N])

if AA[K-1]>0:
  ansB=ansAA//A[K-1]*B[0]
else:ansB=ansAA//A[K-1]*B[-1]

print(ansB)

### FIXED CODE ###

import numpy as np
N,K=map(int, input().split())
A =list(map(int,input().split()))
MOD = 10 ** 9 + 7
if N==K:
  ans0 = 1
  for a in A[0:N]:
    ans0 *= a
    ans0 %= MOD
  print(ans0)
  exit()
A=sorted(A)  
if (K%2==1 and A[-1]<0):
  ans1 = 1
  for a in A[N-K:N]:
    ans1 *= a
    ans1 %= MOD
  print(ans1)
  exit()
 
A=sorted(A, key=lambda x:abs(x), reverse=True)
AA=[np.sign(i) for i in A]
 
ansA = 1
for a in A[0:K]:
  ansA *= a
  ansA %= MOD
ansAA = AA[0:K].count(-1)%2
if ansA==0 or ansAA==0:
  print(ansA)
  exit()

while ansA>0:
  ansA-=MOD

B1=A[0:K]
C1=A[0:K]
B2=sorted(A[K:N])
Bp=[i for i in A[0:K] if i>0]
Bm=[i for i in A[0:K] if i<0]
 
if B2[0]>0:B2.insert(0,0)
if B2[-1]<0:B2.insert(-1,0)
if not Bp:Bp.insert(0,B1[-1])
if not Bm:Bm.insert(0,B1[0])
  
#print(Bp,Bm,B2)
#print(Bp[-1],B2[0])
B1.remove(Bp[-1])
B1.append(min(B2[0],0))
#print(B1)
ansB = 1
for a in B1[0:K]:
  ansB *= a
  ansB %= MOD
#print(Bm[-1],B2[-1])
C1.remove(Bm[-1])
C1.append(max(B2[-1],0))
 
ansC = 1
for a in C1[0:K]:
  ansC *= a
  ansC %= MOD
#print(B1,C1)
#print(ansB,ansC)
BB1=[np.sign(i) for i in B1]
ansBB1 = BB1[0:K].count(-1)%2
BB2=[np.sign(i) for i in C1]
ansBB2 = BB2[0:K].count(-1)%2
#print(ansBB1,ansBB2)
if ansBB1==1:
  print(ansC)
  exit()
if ansBB2==1:
  print(ansB)
  exit()
#print(B2[0]/Bp[-1],B2[-1]/Bm[-1])
#print(Bp[-1]*B2[-1],Bm[0]*B2[0])

#print(abs(Bp[-1]*B2[-1])-abs(Bm[-1]*B2[0]))
#print(ansB,ansC)
if abs(Bp[-1]*B2[-1])-abs(Bm[-1]*B2[0])>=0:
  print(ansC)
else: print(ansB)
N=input()
i=1
while i<N:
    s+=i
    i+=1
    print(s)

### FIXED CODE ###

N=int(input())
print(N*(N+1)//2)
from collections import Counter
n = int(input())
v = list(map(int, input().split()))

a = []
b = []
for i in range(n//2):
    a.append(v[2*i])
    b.append(v[2*i+1])

def change(list):
    counter = Counter(list)
    m_ap1, m_ap2 = counter.most_common()[0][0], counter.most_common()[1][0]
    l = len(list)
    cnt = 0
    for i in range(l):
        if list[i] != m_ap1:
            cnt1 += 1
        if list[i] != m_ap2:
            cnt2 += 1
    return cnt1, cnt2, m_ap1, m_ap2
ca1, ca2, ma1, ma2 = change(a)
cb1, cb2, mb1, mb2 = change(b)

if ca1+cb1:
    if ma1 != mb1:
        print(ca1+cb1)
    else:
        print(min(ca1+cb2,cb1+ca2))
else:
    print(n//2)


### FIXED CODE ###

from collections import Counter
n = int(input())
v = list(map(int, input().split()))

a = []
b = []
for i in range(n//2):
    a.append(v[2*i])
    b.append(v[2*i+1])

def change(list):
    counter = Counter(list)
    m_ap1 = '0'
    m_ap2 = '0'
    if len(counter.most_common()) > 1:
        m_ap1, m_ap2 = counter.most_common()[0][0], counter.most_common()[1][0]
    else:
        m_ap1 = counter.most_common()[0][0]
    l = len(list)
    cnt1 = 0
    cnt2 = 0
    for i in range(l):
        if list[i] != m_ap1:
            cnt1 += 1
        if list[i] != m_ap2:
            cnt2 += 1
    return cnt1, cnt2, m_ap1, m_ap2
ca1, ca2, ma1, ma2 = change(a)
cb1, cb2, mb1, mb2 = change(b)
# print(change(a))
# print(change(b))
if ca1+cb1:
    if ma1 != mb1:
        print(ca1+cb1)
    else:
        print(min(ca1+cb2,cb1+ca2))
else:
    if ma1 != mb1:
        print(ca1+cb1)
    else:
        print(n//2)
def mysqrt(x):
    g = 1.0
    while True:
        if abs(g**2 - x) < 0.000000000001:
            return g
        g = (g+x/g)/2 
print('Yes' if mysqrt(a) + mysqrt(b) < mysqrt(c) else 'No')

### FIXED CODE ###

a,b,c = map(int,input().split())
if (c>a+b) and (c>2):
  print('Yes' if (c-a-b)**2 > 4*a*b else 'No')
else:
  print('No')
N = int(input())
S = input()

ans = 0
for i in range(N):
    ans = max(ans,len(set(s[:i]) & set(s[i:]))
print(ans)

### FIXED CODE ###

N = int(input())
S = input()
ans = 0
for i in range(N):
    ans = max(ans,len(set(S[:i]) & set(S[i:])))
print(ans)
2 2 4 4 4
11 12 13 14
21 22 23 24
1 2 3 4


### FIXED CODE ###

x,y,a,b,c = map(int,input().split())
parr = list(map(int,input().split()))
qarr = list(map(int,input().split()))
rarr = list(map(int,input().split()))

parr.sort(reverse=True)
qarr.sort(reverse=True)
rarr.sort(reverse=True)
parr = parr[:x]
qarr = qarr[:y]
arr = parr + qarr + rarr
arr.sort(reverse=True)
print(sum(arr[:x+y]))
list=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(list[int(input())])


### FIXED CODE ###

list=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(list[int(input())-1])
n, k = map(int, input().split())
v = list(map(int, input().split()))

m = k // 2 + (k % 2)

a = [0] * (n+1)
d = [0] * (n+1)

a[0] = 0
d[n] = 0
for i in range(n):
    a[i+1] = a[i] + v[i]
    d[n-1-i] = d[n-i] + v[n-1-i]

w = []
for i in range(n):
    w.append([v[i], i])

w.sort()

ans = 0

#print(a)
#print(d)

for i in range(m):
    p = k - i
    for j in range(p+1):
        #print(j, n-p-j, a[j], d[n-p-j])
        temp = a[j] + d[n-p+j]
        c = 0
        for _ in range(i):
            if w[c][0] >= 0:
                break
            if w[c][1] < j or w[c][1] > n-p+j:
                temp -= w[c][0]
            c += 1


        ans = max(temp, ans)

print(ans)

### FIXED CODE ###

n, k = map(int, input().split())
v = list(map(int, input().split()))

m = k // 2 + (k % 2)

a = [0] * (n+1)
d = [0] * (n+1)

a[0] = 0
d[0] = 0
for i in range(n):
    a[i+1] = a[i] + v[i]
    d[i+1] = d[i] + v[n-1-i]

w = []
for i in range(n):
    w.append([v[i], i])

w.sort()

ans = 0

p = min(n, k)
for L in range(p + 1):
    for R in range(p + 1 - L):
        #print(L, R)
        temp = a[L] + d[R]
        b = min(L + R, k - L - R)
        c = 0
        while b > 0:
            if w[c][0] >= 0:
                break
            if w[c][1] < L or w[c][1] > n - 1 - R:
                #print(w[c][1], L, R)
                temp -= w[c][0]
                b -= 1
            c += 1
        #print(L, R, temp, b)
        ans = max(ans, temp)

print(ans)
a,b,c,d == map(int,input().split())
if a % d = 0:
    e = a / d
else:
    e = a / d + 1

if c % d == 0:
    f = c / b
else:
    f = a / d + 1
    
if e > f:
    print("Yes")
elif e == f:
    print("Yes")
else:
    print("No")

### 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
n = int(input())
ary = [int(_) for _ in input().split()]
q = int(input())
qs = [int(_) for _ in input().split()]


def search(ary, s, q):

    if not ary:
        return False

    else:
        tmp = ary[0]

        if s + tmp == q:
            return True
        else:
            return search(ary[1:], s, q) or search(ary[1:], s + tmp, q)


for q in qs:
    if search(ary, 0, q):
        print('yes')
    else:
        print('no')



### FIXED CODE ###

n = int(input())
ary = [int(_) for _ in input().split()]
q = int(input())
qs = [int(_) for _ in input().split()]


def search_rec(ind, s, q):
    if ind == n:
        return False
    else:
        tmp = ary[ind]
        if s + tmp == q:
            return True
        else:
            return search(ind + 1, s, q) or search(ind + 1, s + tmp, q)


def search(q):
    sum_ary = [0]

    for i in ary:
        for s in sum_ary:
            if s + i == q:
                return True
        sum_ary += [i + _ for _ in sum_ary]

    else:
        return False


for q in qs:
    if search(q):
        print('yes')
    else:
        print('no')
S = input()
alp = "abcdefghijklmnopqrstuvwxyz"
alpC = "abcdefghijklmnopqrstuvwxyzC"

ans = "AC"
if S[0] != "A":
    ans = "WA"
countC = 0
for i in S[2:-1]:
    if i == "C":
        countC += 1
    if not i in alpC:
        ans = "WA"
if countC != 1:
    ans = "WA"
if not S[1] in alp:
    ans = "WA"
if not S[-1] in alp:
    ans = "WA"
pirnt(ans)

### FIXED CODE ###

S = input()
alp = "abcdefghijklmnopqrstuvwxyz"
alpC = "abcdefghijklmnopqrstuvwxyzC"

ans = "AC"
if S[0] != "A":
    ans = "WA"
countC = 0
for i in S[2:-1]:
    if i == "C":
        countC += 1
    if not i in alpC:
        ans = "WA"
if countC != 1:
    ans = "WA"
if not S[1] in alp:
    ans = "WA"
if not S[-1] in alp:
    ans = "WA"
print(ans)
s=input()
if s is 'SUN':
  print(7)
if s is 'MON:
  print(6)
if s is 'TUE':
  print(5)
if s is 'WED:
  print(4)
if s is 'THU':
  print(3)
if s is 'FRI:
  print(2)
if s is 'SAT':
  print(1)

### FIXED CODE ###

s=input()
if s == 'SUN':
  print(7)
if s == 'MON':
  print(6)
if s == 'TUE':
  print(5)
if s == 'WED':
  print(4)
if s == 'THU':
  print(3)
if s == 'FRI':
  print(2)
if s == 'SAT':
  print(1)
N=int(input())
A=list(map(int,input().split()))

turn=A[1]-A[0]
ans=1
for i in range(1,N-1):
    judge=turn * (A[i+1]-A[i])

    if judge<0:
        ans+=1
        turn=0
    else:
        turn=A[i+1]-A[i]

print(ans)

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))

ans=1
x=y=0
c=A[0]

for i in range(1,N):
    if c < A[i]:
        x=1
    elif c>A[i]:
        y=1
    
    if x==1 and y==1:
        ans+=1
        x=y=0
    
    c=A[i]

print(ans)
N,K = map(int,input().split())
XYC = [tuple(map(int,input().split())) for i in range(N)]

from math import hypot,acos,atan2,cos,sin
def circles_cross_points(x1,y1,r1,x2,y2,r2):
    d = hypot(x1-x2, y1-y2)
    if r1 + r2 < d or abs(r1 - r2) >= d: return []
    a = acos((r1**2 + d**2 - r2**2) / (2*r1*d))
    t = atan2(y2-y1, x2-x1)
    return [
        (x1+cos(t+a)*r1, y1+sin(t+a)*r1),
        (x1+cos(t-a)*r1, y1+sin(t-a)*r1)
    ]

eps = 10e-10
def is_ok(t):
    cands = []
    for x,y,_ in XYC:
        cands.append((x,y))
    for i,(x1,y1,c1) in enumerate(XYC[:-1]):
        for x2,y2,c2 in XYC[i+1:]:
            ps = circles_cross_points(x1,y1,t/c1,x2,y2,t/c2)
            cands += ps
    for cx,cy in cands:
        k = 0
        for x,y,c in XYC:
            d = hypot(cx-x,cy-y)
            if c*d <= t + eps:
                k += 1
                if k >= K:
                    return True
    return False

ok = 10**10
ng = 0
for _ in range(100):
    m = (ok+ng)/2
    if is_ok(m):
        ok = m
    else:
        ng = m
print(ok)

### FIXED CODE ###

N,K = map(int,input().split())
XYC = [tuple(map(int,input().split())) for i in range(N)]

from math import hypot,acos,atan2,cos,sin
def circles_cross_points(x1,y1,r1,x2,y2,r2):
    d = hypot(x1-x2, y1-y2)
    if r1 + r2 < d or abs(r1 - r2) >= d: return []
    x = (r1**2 + d**2 - r2**2) / (2*r1*d)
    if not -1 <= x <= 1: return []
    a = acos(x)
    t = atan2(y2-y1, x2-x1)
    return [
        (x1+cos(t+a)*r1, y1+sin(t+a)*r1),
        (x1+cos(t-a)*r1, y1+sin(t-a)*r1)
    ]

eps = 10e-10
def is_ok(t):
    cands = []
    for x,y,_ in XYC:
        cands.append((x,y))
    for i,(x1,y1,c1) in enumerate(XYC[:-1]):
        for x2,y2,c2 in XYC[i+1:]:
            ps = circles_cross_points(x1,y1,t/c1,x2,y2,t/c2)
            cands += ps
    for cx,cy in cands:
        k = 0
        for x,y,c in XYC:
            d = hypot(cx-x,cy-y)
            if c*d <= t + eps:
                k += 1
                if k >= K:
                    return True
    return False

ok = 10**10
ng = 0
for _ in range(100):
    m = (ok+ng)/2
    if is_ok(m):
        ok = m
    else:
        ng = m
    if ok-ng < 10e-7: break
print(ok)
n,k=map(int,input().split())
s=list(str(input()))
l=[]
c=0
for i in range(n):
	if s[i]=='1' and c==0:
		l.append(i)
		c=1
	elif s[i]=='0':
		c=0
for i in range(n-1,-1,-1):
	if s[i]=='1':
		a=i
		break
else:
	a=n-1
l=[0]+l[1:-1]+[a]
#print(l)
m=len(l)
r=[]
for i in range(m-k):
	r.append(l[i+k]-l[i]+1)
print(max(r))

### FIXED CODE ###

n,k=map(int,input().split())
s=list(str(input()))
r=[]
l=[]
c=0
d=1
for i in range(n):
	if s[i]=='1' and d==1:
		r.append(i)
		c=1
		d=0
	elif s[i]=='0' and c==1:
		l.append(i-1)
		c=0
		d=1
if c>0:
	l.append(i)
if len(r)<=k+1:
	r=[0]*(k+1-len(r))+r+[n-1]*(k+1-len(r))
	l=[0]*(k+1-len(l))+l+[n-1]*(k+1-len(l))
r=[0]+r+[n-1]
l=[0]+l+[n-1]
ans=0
for i in range(len(r)-k):
	ans=max(ans,l[i+k]-r[i]+1)
print(ans)
a,b,c=input().split()
d=list(map(int,input().split()))
e=0
f=0
for i in range(b):
  if d[i]>c:
    e=e+1
  if d[i]<c:
    f=f+1
if e>f:
  print(f)
else:
  print(e)

### FIXED CODE ###

a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
d=list(map(int,input().split()))
e=0
f=0
for i in range(b):
  if d[i]>c:
    e=e+1
  if d[i]<c:
    f=f+1
if e>f:
  print(f)
else:
  print(e)
Num = str(input())
L = len(Num)
if Num[1:] == '9'*(l-1):
  val = int(Num[0]) + 9*(l-1)
else:
  val = int(Num[0])-1 + 9*(l-1)
print(val)

### FIXED CODE ###

Num = str(input())
L = len(Num)
if Num[1:] == '9'*(L-1):
  val = int(Num[0]) + 9*(L-1)
else:
  val = int(Num[0])-1 + 9*(L-1)
print(val)
a=map(int,input().split(" "))
Ai=map(int,input().split(" "))
n=a[0]
days=0
for A in Ai:
    days+=A
if days>n:
    print(-1)
else:
    print(n-days)

### FIXED CODE ###

n,m=map(int,input().split(" "))
Ai=list(map(int,input().split(" ")))
days=0
for a in Ai:
    days+=a
if days>n:
    print(-1)
else:
    print(n-days)
import sys
n=int(input())
s=[[int(i) for i in l.split()] for l in sys.stdin]
for cx in range(101):
  for cy in range(101):
    flag=True
    flag2=True
    stack2==10**18
    for i in range(n):
      if flag==False:
        break
      x,y,h=s[i]
      H=abs(x-cx)+abs(y-cy)+h
      if h!=0 and flag2:
        stack=H
        flag2=False
      if h==0:
        stack2=min(stack2,H)
      if h!=0 and flag2==False:
        if stack!=H:
          flag=False
          break
    if flag and stack<=stack2:
      print(cx,cy,H)
      exit()

### FIXED CODE ###

import sys
n=int(input())
s=[[int(i) for i in l.split()] for l in sys.stdin]
for cx in range(101):
  for cy in range(101):
    H=[]
    Z=[]
    for i in range(n):
      x,y,h=s[i]
      if h!=0:
        H.append(abs(x-cx)+abs(y-cy)+h)
      else:
        Z.append(abs(x-cx)+abs(y-cy))
    if len(Z)==0:
      Z.append(10**18)
    if H.count(H[0])==len(H) and min(Z)>=H[0]:
      print(cx,cy,H[0])
      exit()
N=int(input())
A=map(int, input().split())
sortedA=sorted(A, reverse=True)
Bob=0
Alice=0
for i in range(len(A)):
  # print(i)
  if i == 0 or i%2==0:
    Alice+=sortedA[i]
  else:
    Bob +=sortedA[i]
print(Alice-Bob)


### FIXED CODE ###

N=int(input())
A=list(map(int, input().split()))
sortedA=sorted(A, reverse=True)
Bob=0
Alice=0
for i in range(len(A)):
  # print(i)
  if i == 0 or i%2==0:
    Alice+=sortedA[i]
  else:
    Bob +=sortedA[i]
print(Alice-Bob)
x,y = map(int,input().split())

group1 = list(1,3,5,7,8,10,12)
group2 = list(4,6,9,11)

if x in group1 and y in group1:
  print('Yes')
elif x in group2 and y in group2:
  print('Yes')
elif x == y == 2:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

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

group1 = [1,3,5,7,8,10,12]
group2 = [4,6,9,11]

if x in group1 and y in group1:
  print('Yes')
elif x in group2 and y in group2:
  print('Yes')
elif x == y == 2:
  print('Yes')
else:
  print('No')