Harryxun/stf_run huggingface dataset:
a,b=map(int,input().split())
for i in range(a):
  for j in range(b):
   if i+j=a and i*2+4*j=b:
    print("Yes")
     break
   else:
     print("No")

### FIXED CODE ###

a=[]
a=input().split()
for i in range(5):
 if a[i]=='0':
   print(str(i+1))
 else:
   pass
s=input()
ans=0
for i in range(1 << len(s)-1):
    l=[]
    for j in range(len(s)-1):
        if (i>>j)&1==1:
            l.append(s[j])
            l.append("+")
        else:
            l.append(S[j])
    l.append(s[len(s)-1])
    sum+=eval(''.join(l))
print(sum)

### FIXED CODE ###

s=input()
ans=0
for i in range(1 << len(s)-1):
    l=[]
    for j in range(len(s)-1):
        if (i>>j)&1==1:
            l.append(s[j])
            l.append("+")
        else:
            l.append(s[j])
    l.append(s[len(s)-1])
    ans+=eval(''.join(l))
print(ans)
import collections

def main():
    n =int( input())
    sn = []

    for _ in range(n):
        inWord = str(input())
        addFlag = True
        for s in sn:
            if s["word"] == inWord and len(sn) !=0:
                s["count"]+=1
                addFlag = False
                break
        if addFlag ==True:
            sn.append( {"word":inWord,"count":1})
    
    sn.sort(reverse=True,key=lambda x:x['count'])
    
    most = int(sn[0]["count"])
    mostWords=[]
    for elm in sn:
        if elm["count"] == most:
            mostWords.append(elm["word"])
        else:
            break

    mostWords.sort()

    for elm in mostWords:
        print(elm)
    return
main()



### FIXED CODE ###

A, B, C = map(int, input().split())

if A == B or B == C or C == A:
    if A == B and B == C:
        print("No")
    else:
        print("Yes")

else:
    print("No")
n=int(input().split())
dic={}
for i in range(0,n):
  s="".join(sorted(input()))
  if s in dic:
    dic[s]+=1
  else:
    dic[s]=1
    
ans=0    
for a in dic.values():
  ans+=(a*(a-1))/2
  
print(ans)

### FIXED CODE ###

n=int(input())
dic={}
for _ in range(0,n):
  s="".join(sorted(input()))
  if s in dic:
    dic[s]+=1
  else:
    dic[s]=1
    
ans=0    
for a in dic.values():
  ans+=(a*(a-1))/2
  
print(int(ans))
n,m = map(int,input().split())
num = [-1]*n
for i in range(m):
  s,c = map(int,input().split())
  if n!=1 and s==1 and c==0:
    print(-1)
    exit()
  if num[s-1]==-1: num[s-1] = c
  elif num[s-1]!==c:
    print(-1)
    eixt()
for i in range(n):
  if num[i] == -1: num[i] = 0
if num[0] == 0 and len(num)!=1: num[0] = 1
print(int(''.join(num)))

### FIXED CODE ###

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

num = 0
dic = {}

for i in range(m):
  s,c = map(int, input().split())
  if n!=1 and s==1 and c==0: 
    print(-1)
    exit()
  if s not in dic:
    dic[s] = c
    num = num + c*(10**(n-s))
  elif c!=dic[s]:
    print(-1)
    exit()

if 1 not in dic and n>1:
  num = num + 10**(n-1)

print(num)
### 解答
N, K = map(int, input().split())
A = list(map(int, input().split()))

#B = [0]*N                                 # 記録用のリスト

for k in range(K):                        # 以降の操作をK回繰り返す
  B = [0 for _ in range(N)] 
  for i in range(N):                      # 各電球によって照らされる範囲を考える
    start = max(0, i-A[i])                # 始点のインデックスは0かi-A[i]
    end = min(N, i+A[i]+1)                # 終点のインデックスはNかi+A[i]+1
    B[start] += 1                         # 始点に+1を記録する
    if end <= N - 1:
      B[end] -= 1                         # 終点に電球が存在する場合は-1を記録する
  amin = B[0]
  A[0] = B[0] 
  for i in range(1, N):                   # 累積和の計算
    A[i] = B[i-1] + B[i]
    amin = min(A[i], amin)                                   # AをBで更新してつぎのループへ 
  if amin == N:                        # すべての電球がN個の電球に照らされるタイミングでbreakする
    break

print(*A)                                 # リストAの中身を順に表示

### FIXED CODE ###

import numpy as np
from numba import njit
 
n, k = map(int, input().split())
a = np.array(list(map(int, input().split())), dtype=np.int64)
 
@njit
def loop1(a):
  b = np.zeros(n+1, dtype=np.int64)
  for i in range(n):
    l = max(0, i-a[i])
    r = min(i+a[i]+1, n)
    b[l] += 1
    if r <= n-1: b[r] -= 1
  
  b = np.cumsum(b)[:-1]
  return b
 
for q in range(min(42, k)):
  a = loop1(a)
    
print(*a)
#coding:utf-8
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(input = sys.stdin.readline):
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    N = II()
    
    MAXL = 101
    b = [[0] * MAXL for _ in range(MAXL)]

    def vtop(x1,x2,y1,y2,h1):
        return h1 + abs(x1-x2) + abs(y1-y2)
    h = 0
    while h == 0:
        x,y,h = LMIIS()
        if h == 0:
            continue
        for i in range(MAXL):
            for j in range(MAXL):
                b[i][j] = vtop(x,j,y,i,h)

    for _ in range(N-1):
        x,y,h = LMIIS()
        if h == 0:
            continue
        for i in range(MAXL):
            for j in range(MAXL):
                if b[i][j] != -1 and b[i][j] != vtop(x,j,y,i,h):
                    b[i][j] = -1
    for i in range(MAXL):
        for j in range(MAXL):
            if b[i][j] != -1 and b[i][j] < 10**9:
                print(j,i,b[i][j])
                return


if __name__ == '__main__':
    main()

### FIXED CODE ###

#coding:utf-8
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(input = sys.stdin.readline):
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())

    N = II()
    info = []
    for _ in range(N):
        xi, yi, hi = LMIIS()
        if hi != 0:
            xt, yt, ht = xi, yi, hi
        info.append((xi, yi, hi))

    for Cy in range(101):
        for Cx in range(101):
            H = ht + abs(xt - Cx) + abs(yt - Cy)
            found = True
            for xi, yi, hi in info:
                tmp_h = max(H - abs(Cy-yi) - abs(Cx-xi), 0)
                if tmp_h != hi:
                    found = False
                    break
            if found:
                print('{} {} {}'.format(Cx,Cy,H))
                return



if __name__ == '__main__':
    main()
#ALDS_3_C 16D8103010K Ko Okasaki

from collections import deque

def pr(A,n):
    for i in range(n):
        if i!=n-1:
            print(A[i],end=" ")
        else:
            print(A[i])

n=int(input())
que_r=deque()


for i in range(n):
    s=input().split()

    if s[0]=="insert":
        que_r.appendleft(int(s[1]))
    elif s[0]=="delete":
        que_r.remove(int(s[1]))
    elif s[0]=="deleteFirst":
        gav=que_r.popleft()
    else:
        gav=que_r.pop()

pr(que_r,len(que_r))


### FIXED CODE ###

from collections import deque


n=int(input())
que_r=deque()

for i in range(n):
    s=input()
    l=len(s)
    if s[0]=="i":
        que_r.appendleft(s[7:])
    elif s[6]==" ":
        try:
            que_r.remove(s[7:])
        except: pass
    elif l>10:
        que_r.popleft()
    elif l>6:
        que_r.pop()

print(*que_r)
n=int(input())
s=input()
c=0
for i in range(1,N):
  x=set(s[:i])
  y=set(s[i:])
  len(a)=x&y
  c=max(c,a)
print(c)

### FIXED CODE ###

n=int(input())
s=input()
c=0
for i in range(1,n):
  x=set(s[:i])
  y=set(s[i:])
  a = len(x & y)
  if a > c:
    c = a
print(c)
N = input()
A = input()

print str(N * N - A)

### FIXED CODE ###

N = int(input())
A = int(input())

print(N*N-A)
import math
N,K=map(int,input().split())

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

for i in range(1,K+1):
    print((combinations_count(N-K+1,i)*combinations_count(K-1,i-1))%(10**10+7))
    


### FIXED CODE ###

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

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

for i in range(1,K+1):
    if N-K+1>=i:
        print((combinations_count(N-K+1,i)*combinations_count(K-1,i-1))%(10**9+7))
    else:
        print(0)
N, M = map(int, input().split())
Grapeee = {j+1:[] for j in range(N)}
memo = {j+1: 0 for j in range(N)} # 各頂点からの最長経路をメモ. -1で初期化.
doneee = {j+1: False for j in range(N)}
ans = 0

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

#print(memo)
#print(done)
def dp(v):# 頂点nから始まる最長経路を返す.
  if doneee[v]: 
    return memo[v]
  elif doneee[v] == False:
    answ = 0
    for to in Grapeee[v]:
      answ = max(answ, dp(to)+1)
    memo[v] = answ
    doneee[v] = True
    #print(memo)
    #print(done)
    return answ

for n in range(1,N+1):
  #print(dp(n))
  ans = max(ans, dp(n))
print(ans)




### FIXED CODE ###

import sys
sys.setrecursionlimit(200000)
N, M = map(int, input().split())
G = [[] for _ in range(N+1)]
MEMO = [-1 for _ in range(N+1)]

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


def dp_LP(v):# 頂点nから始まる最長経路を返す.
  if MEMO[v] != -1:
    return MEMO[v]
  else:
    ans = 0
    for i in G[v]:
      ans = max(ans, dp_LP(i)+1)
    MEMO[v] = ans

    return ans



answer = 0
for n in range(1,N+1):
  answer = max(answer, dp_LP(n))
print(answer)
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1"))
print(round(ans))

### FIXED CODE ###

print(input().count("1"))
a = input()
b = input()
print((int(a) * int(b)),((int(a) * 2) + (int(b) * 2)))

### FIXED CODE ###

a ,b = input().split(' ')
print(int(a) * int(b),(int(a) * 2) + (int(b) * 2))
a = int(input())
b = int(input())
if a >= 13 :
  print(b)
elif a >= 6 :
  print(b//2)
else :
  print(0)

### FIXED CODE ###

a, b = map(int, input().split())
if a >= 13 :
  print(b)
elif a >= 6 :
  print(b//2)
else :
  print(0)
l=[]
for mark in ["S","H","C","D"]:
	for i in range(1,14):
		l.append(mark+" "+str(i))
n=input()
for i in range(int(n)):
	l.remove(input())
for i in l[:-1]:
	print(i)
print(l[-1])

### FIXED CODE ###

l=[]
for mark in ["S","H","C","D"]:
	for i in range(1,14):
		l.append(mark+" "+str(i))
n=input()
for i in range(int(n)):
	l.remove(input())
for i in l:
	print(i)
import math
def combi(n,r):
    if r > n:return 0
    return math.factorial(n) // (math.factorial(n - r)*(math.factorial(r)))


def solve(i,k,smaller):
    #一番最後の桁まで調べたら終了
    if i == N:
        if k == 0:return 1
        else: 0
    #途中であっても0以外の数字を使い切ったら終了
    if k == 0:return 1

    #Nより小さいことが確定すれば残りの桁数（N-i）のうち
    #k個所に0以外の数字（9**k通り）を使い，それ以外の桁の数字は0なので
    #C(n-i,n-i-k)=C(n-i,k)個所に0をはめる
    if smaller: return combi(N-i, k)*(9**k)
    else:
        #i桁目が0なら，smallerであるといえない
        if S[i] == '0':return solve(i+1,k,False)
        else:
            zero = solve(i+1, k, True)
            aida = solve(i+1, k-1, True) * (int(S[i])-1)
            icchi = solve(i+1, k-1, False)
            return zero + aida + icchi

#0出ない数字がちょうどＫ個であるようなN以下の整数を探索
S = input()
N = len(S)
K = int(input())
print((solve(0,K,False)))

### FIXED CODE ###

import math
def combi(n,r):
    if r > n:return 0
    return math.factorial(n) // (math.factorial(n - r)*(math.factorial(r)))


def solve(i,k,smaller):
    #一番最後の桁まで調べたら終了
    if i == N:
        if k == 0:return 1
        else: return 0

    #途中であっても0以外の数字を使い切ったら終了
    if k == 0:return 1

    #Nより小さいことが確定すれば残りの桁数（N-i）のうち
    #k個所に0以外の数字（9**k通り）を使い，それ以外の桁の数字は0なので
    #C(n-i,n-i-k)=C(n-i,k)個所に0をはめる
    if smaller: return combi(N-i, k)*(9**k)
    else:
        #i桁目が0なら，smallerであるといえない
        if S[i] == '0':return solve(i+1,k,False)
        else:
            zero = solve(i+1, k, True)
            aida = solve(i+1, k-1, True) * (int(S[i])-1)
            icchi = solve(i+1, k-1, False)
            return zero + aida + icchi

#0出ない数字がちょうどＫ個であるようなN以下の整数を探索
S = input()
N = len(S)
K = int(input())
print((solve(0,K,False)))
s = sorted(input())
t = sorted(input())[:: -1]
print("Yes" if s < t else "No")


### FIXED CODE ###

S = input()
print('Heisei' if S <= '2019/04/30' else 'TBD')
inputA,B = input().split()
a = int(A)
b = int(B)
K = (a+b)/2
if K == int(K):
  print(int(K))
else:
  print('IMPOSSIBLE')

### FIXED CODE ###

A,B = input().split()
a = int(A)
b = int(B)
K = (a+b)/2
if K == int(K):
  print(int(K))
else:
  print('IMPOSSIBLE')
z,y,x=(int(x) for x in input().split())
if z == y:
  if y ==x:
    return "No"
  else:
    return "Yes"
else:
  if z ==x:
    return "Yes"
  else:
    if y == x:
      return "Yes"
    else:
      return "No"

### FIXED CODE ###

x,y,z=(input().split(" "))
if z == y:
  if y ==x:
    print("No")
  else:
    print("Yes")
else:
  if z ==x:
    print("Yes")
  else:
    if y == x:
      print("Yes")
    else:
      
      print("No")
data = input()
a,b = data.split()
if(a==b):
  print(a+b)
elif(a>b):
  print(2*a-1)
else:
  print(2*b-1)

### FIXED CODE ###

data = input()
a,b = data.split()
a = int(a)
b = int(b)
if(a==b):
  print(a+b)
elif(a>b):
  print(2*a-1)
else:
  print(2*b-1)
import sys
input=sys.stdin.readline
h,w=map(int,input().split())
distance=[]
for _ in range(10):
   distance.append(list(map(int,input().split())))

for k in range(10):
   for j in range(10):
      for i in range(10):
         distance[i][j]=min(distance[i][j],distance[i][k]+distance[k][j])

ans=0
for _ in range(h):
   A=list(map(int,input().split()))
   for a in A:
      if a!=-1:
         ans.append(distance[a][0])
print(ans)

### FIXED CODE ###

import sys
input=sys.stdin.readline
h,w=map(int,input().split())
distance=[]
for _ in range(10):
   distance.append(list(map(int,input().split())))

for k in range(10):
   for j in range(10):
      for i in range(10):
         distance[i][j]=min(distance[i][j],distance[i][k]+distance[k][j])

ans=0
for _ in range(h):
   A=list(map(int,input().split()))
   for a in A:
      if a!=-1:
         ans+=distance[a][1]
print(ans)
N, K = map(int,input().split()) 
P = list(map(int,input().split()))
maxsize = 0
expectsum = 0
for i in range(N-K):
    if P[i]>P[i+K]:
        pass 
    else:
        sum_3 = sum(P[i+1:i+K+1])
        if sum_3 >= max_size:
            max_size = sum_3
            expect = 0
            for j in range(K):
                expect += (P[i+1+j]+1)/2
                if expect > expectsum:
                    expectsum = expect
print(expect)

### FIXED CODE ###

def expect(n):
    return (int(n)+1)/2
N, K = map(int,input().split()) 
P = list(map(expect,input().split()))
sumlist = [sum(P[0:K])]
sumnumber = sum(P[0:K])
for i in range(N-K):
    sumnumber -=P[i]
    sumnumber +=P[i+K]
    sumlist.append(sumnumber)
print(max(sumlist))
N = int(input())
l = list(map(int,input().split()))
l_ans = []

for i in range(1,101):
    sum = 0

    for j in range(N):
        sum = sum + (i-l[j])**2

    l_ans[i] = sum

print(min(l))

### FIXED CODE ###

N = int(input())
l = list(map(int,input().split()))
l_ans = [[] for _ in range(201)]

for i in range(-100,101):
    sum = 0

    for j in range(N):
        sum = sum + (i-l[j])**2

    l_ans[i+100] = sum

print(min(l_ans))
L = int(input())

# 必要な頂点数を出す
N = 0
for i in range(21):
    if 2 ** i > L:
        break
    else:
        N = i
N += 1

# ここから頂点番号は0-indexedとし、出力時に1-indexedにする
G = []
# 頂点iと頂点i+1との間にコスト0の辺とコスト2^(頂点番号)の辺を張る
for i in range(N - 1):
    G.append((i, i + 1, 0))
    G.append((i, i + 1, 2 ** i))

# 表現できてないコストを列挙
R = list(range(2 ** (N - 1), L))[::-1]
marker = 0  # どこまで表現したかを表すマーカー
B = bin(len(R))[2:]  # どこにバイパスを張るか

# バイパスを張っていく
for i in range(len(B)):
    if B[i] == '0':
        continue

    G.append((i, N - 1, R[marker]))
    marker += 2 ** (i + 1)

print(N, len(G))
for u, v, w in G:
    print(u + 1, v + 1, w)


### FIXED CODE ###

L = int(input())
ans = []

# 頂点数はbitの長さ
N = len(bin(L)[2:])

# 頂点間に0の辺と2**iの辺を張る
for i in range(N - 1)[::-1]:
    ans.append([i + 1, i + 2, 2 ** (N - i - 2)])
    ans.append([i + 1, i + 2, 0])

# 表現できてないパスの個数
need = L - (2 ** (N - 1))

# 表現できてないコスト（大きい順）
cost = list(range(2 ** (N - 1), 2 ** (N -1) + need))

# コストのリスト上を移動するマーカー
marker = 0

# どこにバイパスを張るか
bit = bin(need)[2:][::-1]

# バイパスを張っていく
for i in range(len(bit)):
    if bit[i] != "1":
        continue

    # 辺を追加
    ans.append([1, N - i, cost[marker]])

    # マーカーを進める
    marker += 2 ** i

print(N, len(ans))
for a in ans:
    print(" ".join(map(str, a)))
x = map(int, input().split())
x.sort()
print(x, sep = "")



### FIXED CODE ###

x = list(map(int, input().split()))
x.sort()
print(" ".join(map(str, x)))
import numpy as np
def solve(N, K, A):
    numbers = {}
    for a in A:
        numbers[a] = numbers.get(a, 0) + 1
    M = len(numbers)
    if M <= K:
        return 0
    dp = np.full((M+1, M+1), N, dtype=int)
    dp[0,:] = 0 
    for i, n in enumerate(numbers.values()):
        for j in range(M+1):
            if j > 0:           
                dp[i+1,j] = min(dp[i+1,j], dp[i,j-1], dp[i,j] + n)
            else:                           
                dp[i+1,j] = min(dp[i+1,j], dp[i,j] + n)
    return min(dp[M,:K+1])                          
                                                        
N, K = map(int, raw_input().split())                            
A = map(int, raw_input().split())                                           
print solve(N, K, A)  

### FIXED CODE ###

def solve(N, K, A):
    numbers = {}
    for a in A:
        numbers[a] = numbers.get(a, 0) + 1
    if len(numbers) <= K:
        return 0
    return N - sum(sorted(numbers.values(), key=lambda x: -x)[:K])
N, K = map(int, raw_input().split())
A = map(int, raw_input().split())
print solve(N, K, A)
N= int(input)
A= int(input)
B= int(input)
if A*N>B:
  print(B)
else: 
  print(A*N)

### FIXED CODE ###

N,A,B=map(int,input().split())
if N*A >=B:
  print (B)
else:
  print(N*A)
nn=int(input())
kk=int(input())
num_value = list(map(int, input().split())) 
num_value.sort()
goukei=0
for i in range(kk):
    goukei=goukei+num_value[kk]
print(goukei)

### FIXED CODE ###

nn,kk=map(int,input().split())
num_value = list(map(int, input().split())) 
num_value.sort()
gokei=0
for i in range(kk):
   gokei=gokei+num_value[i]
print(gokei)
l = input()
m = input()
z = l.split(" ")
M = int(z[1])
N = int(z[0])
F = m.split(" ")
X = []
amount=0
for item in F:
  votes = int(item)
  amount = amount + votes
  X.append(votes)
  X.sort(reverse==true)
C = (1/4M)*amount
for i in range(M):
  if X[i]<C:
    print("No")
    return
print("Yes")


### FIXED CODE ###

l = input()
m = input()
z = l.split(' ')
M = int(z[1])
N = int(z[0])
F = m.split(' ')
X = []
 
for item in F:
  votes = int(item)
  X.append(votes)

S = sum(X)
C = (S/(4*M))
X.sort(reverse=True)
if X[M-1]<C:
  print("No")
else:
  print("Yes")
A=[[int(x) for x in input().split()]for i in range(3)]
n=int(input())
b=list(map(int,input().split()))
for i in range(3):
    if A[i][0] in b and A[i][1] in b and A[i][2] in b:
        print('Yes')
        exit()
    elif A[0][i] in b and A[1][i] in b and A[2][i] in b:
        print('Yes')
        exit()
if A[0][0] in b and A[1][1] in b and A[2][2] in b:
    print('Yes')
    exit()
if A[2][0] in b and A[1][1] in b and A[0][2] in b:
    print('Yes')
    exit()
print('No')

### FIXED CODE ###

n=int(input())
if n%2==0:
  print(n//2)
else:
  print((n+1)//2)
import copy

def dic_num(N, s):
    factorial = 1
    cnt = 0
    ss = [0] * N
    for i in range(1, N+1):
        ss[i-1] = i
    
    for i in range(2, N+1):
        factorial *= i
        
    for reN in reversed(range(2, N+1)):
        factorial //= reN
        cnt += (ss.index(s[0]) - ss.index(min(s))) * factorial + 1
        ss.pop(0)
        s.pop(0)
        
        print("{} {}".format(reN, cnt))
    print(cnt)
    return cnt
    

def main():
    N = int(input())
    p_n = list(map(int, input().split()))
    q_n = list(map(int, input().split()))
    
    print(abs(dic_num(N, p_n) - dic_num(N, q_n)))

if __name__ == "__main__":
    main()

### FIXED CODE ###

from itertools import permutations

def num(a_n, c):
    a_n_number = 0
    for i in range(len(a_n)):
        now = a_n[i]
        cnt= 0
        for k in range(i+1, len(a_n)):
            if a_n[k] <  now:
                cnt += 1
        
        a_n_number += c[i] * cnt
    
    return a_n_number


def main():
    n = int(input())
    p_n = list(map(int,input().split()))
    q_n = list(map(int,input().split()))
    c = [1]
    for i in range(n-1):
        c = [c[0]*(i+1)] + c
        
    p_n_num = num(p_n, c)
    q_n_num = num(q_n, c)
    
    print(abs(p_n_num - q_n_num))
        
    
if __name__ == "__main__":
    main()
a, b = map(int, input().split())
print("Yay!" if a <= 8 and b <= 8 else: ":(")

### FIXED CODE ###

a, b = map(int, input().split())
print("Yay!" if a <= 8 and b <= 8 else ":(")
n = int(input())

ac_counter = 0
wa_counter = 0
tle_counter = 0
re_counter = 0

for i in range(n):
  str = input()
  if str == "AC":
    ac_counter += 1
  elif str == "WA":
    wa_counter += 1
  elif str == "TLE":
    tle_counter += 1
  else :
    re_counter += 1
print("AC x "+str(ac_counter))
print("WA x "+str(wa_counter))
print("TLE x "+str(tle_counter))
print("RE x "+str(re_counter))

### FIXED CODE ###

n = int(input())
 
ac_counter = 0
wa_counter = 0
tle_counter = 0
re_counter = 0
 
for i in range(n):
  str = input()
  if str == "AC":
    ac_counter += 1
  elif str == "WA":
    wa_counter += 1
  elif str == "TLE":
    tle_counter += 1
  else :
    re_counter += 1
print("AC x",ac_counter)
print("WA x",wa_counter)
print("TLE x",tle_counter)
print("RE x",re_counter)
a,op,b=input().split
a = int(a)
b = int(b)

if op == '+':
    print(a+b)
elif op == '-':
    print(a-b)

### FIXED CODE ###

a,op,b=input().split()
a = int(a)
b = int(b)

if op == '+':
    print(a+b)
elif op == '-':
    print(a-b)
x = int(input())
y = int(input())
print(x*y)


### FIXED CODE ###

x,y=map(int, input().split())
print(x*y,2*(x+y))
a, b, c = map(int, input().split())
K = int(input())
print(sum(a, b, c) + max(a, b, c)*K)


### FIXED CODE ###

nums = list(map(int, input().split()))
K = int(input())
print(sum(nums) + max(nums)*(2**K) - max(nums))
n = input()
c = map(int, raw_input().split())
q = input()
t = map(int, raw_input().split())

mem = [False] * 101
a = 0
for i in c:
    mem[i] = True
for i in t:
    if mem[i]:
        a += 1
print a

### FIXED CODE ###

n = input()
c = map(int, raw_input().split())
q = input()
t = map(int, raw_input().split())

mem = [False] * 501
a = 0
for i in c:
    mem[i] = True
for i in t:
    if mem[i]:
        a += 1
print a
A, B, X = map(int, input().split())

n = 10 ** (len(str(X)) - 1)
n = int(X / A)

while X < A * n + B * len(str(n)):
    n -= 1

if n > 1000000000:
    n = 1000000000

if n < 0:
    n = 0

print(n)



### FIXED CODE ###


S = input()

day = ['SUN','MON','TUE','WED','THU','FRI','SAT']

n = day.index(S)

print(7 - n)
n = int(input())
li = list(input())
ans = 0
for i in range(n):
  fi = li[:i-1]
  se = li[i+1:]
  hoge = fi.count('E') + se.count('W')
  if ans < hoge:
    ans = hoge
 
print(n - ans - 1)

### FIXED CODE ###

li = list(map(int,input().split()))
ans = [li[0]+li[1],li[0]-li[1],li[0]*li[1]]
ans.sort()
print(ans[2])
N, M = map(int, input().split())

c_sum = 0
for i in range(M):
  b = int(input())
  c_sum += b

day_count = N-c_sum

if day_count>=0:
  print(day_count)
else:
  print(-1)

### FIXED CODE ###

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

c = list(map(int,input().split()))
c_sum = sum(c)

day_count = N-c_sum

if day_count>=0:
  print(day_count)
else:
  print(-1)