Harryxun/stf_run huggingface dataset:
n, k = map(int, input().split())
p = list(map(int, input().split()))
nxt = 0.000000000001
mx = []
for i in range(n):
    pex = (1+p[i])/2+0.000000000001
    mx.append(pex+nxt)
    nxt = pex + nxt
ans = []
for i in range(n-k):
    ans.append(mx[i+k] - mx[i])
print(max(ans))

### FIXED CODE ###

n, k = map(int, input().split())
p = list(map(int, input().split()))
nxt = 0
mx = []
for i in range(n):
    pex = (1+p[i])/2
    mx.append(pex+nxt)
    nxt = pex + nxt
if n == k:
    print(mx[-1])
else:
    ans = []
    for i in range(n-k):
        ans.append(mx[i+k] - mx[i])
    print(max(ans))
import heapq
n,m=map(int,input().split())
g=[[] for i in range(n)]
p=[]
for i in range(m):
    a,b,c=map(int,input().split())
    a-=1
    b-=1
    p.append([a,b,c])
    g[a].append([c,b])
    g[b].append([c,a])
ans=0
for i in range(m):
    s=p[i][0]
    goal=p[i][1]
    c=p[i][2]
    q=[]
    heapq.heappush(q,[0,s])
    v=[-1]*n
    v[s]=0
    while q:
        p=heapq.heappop(q)
        if p[1]==goal:
            break
        for i in g[p[1]]:
            if v[i[1]]==-1:
                v[i[1]]=i[0]+v[p[1]]
                heapq.heappush(q,[v[i[1]],i[1]])
    if p[0]<c:
        ans+=1
print(ans)

### FIXED CODE ###

import heapq
def dijkstra_heap(s,g):
    used = [True] * n #True:未確定
    used[s] = False
    edgelist = []
    for e in edge[s]:
        heapq.heappush(edgelist,[e[0],e[1]])
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        #まだ使われてない頂点の中から最小の距離のものを探す
        if not used[minedge[1]]:
            continue
        v = minedge[1]
        if v==g:
            return minedge[0]
        kai=minedge[0]
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,[e[0]+kai,e[1]])                   
    return -1

################################
n,m = map(int,input().split()) #n:頂点数　w:辺の数

edge = [[] for i in range(n)]
#edge[i] : iから出る道の[重み,行先]の配列
pp=[]
for i in range(m):
    x,y,z = map(int,input().split())
    edge[x-1].append([z,y-1])
    edge[y-1].append([z,x-1])
    pp.append([x-1,y-1,z])
ans=0
for i in range(m):
    if pp[i][2]>dijkstra_heap(pp[i][0],pp[i][1]):
        ans+=1
print(ans)
S = input()
ans = 99999
for i in range(len(S)-2):
  ans = min(ans, abs(S[i:i+3], 753)
            
print ans

### FIXED CODE ###

S = input()
ans = 99999
for i in range(len(S)-2):
    ans = min(ans, abs(int(S[i:i+3])-753))
print(ans)
n, m ,l = map(int, input().split())

A = [list(map(int,input().split())) for i in range(n)]
B = [list(map(int,input().split())) for j in range(m)]

C = [[0 for i in range(l)] for j in range(n)]

for i in range(l):
	for j in range(n):
		for k in range(m):
			C[i][j] + = (A[i][k] * B[k][j])

Cp = [print(" ".join(map(str, C[i]))) for i in range(n)]

### FIXED CODE ###

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

A = [list(map(int,input().split())) for i in range(n)]
B = [list(map(int,input().split())) for j in range(m)]

C = [[0 for i in range(l)] for j in range(n)]

for i in range(n):
	for j in range(l):
		for k in range(m):
			C[i][j] += (A[i][k] * B[k][j])

Cp = [print(" ".join(map(str, C[i]))) for i in range(n)]
A,B=map(int,input().split())

x_max=int((100/8)*(A+1))
x_min=int((100/8)*A)

if x_min==x_max:
    x=x_min
for i in range(x_min,x_max+1):
    if int(i*(1/10))==B:
        x=i
        break

if x<0 or 100<x:
    print("-1")
else:
    print(x)

### FIXED CODE ###

A,B=map(int,input().split())
 
ans=-1
for x in range(1000+1):
    if int(x*(8/100))==A and int(x*(10/100))==B:
        ans=x
        break

print(ans)
N = int(input())
import numpy as np

A = list(map(int, input().split()))
dp = np.zeros((N,9))
for i in range(N):
  tmp = [0]*(A[i]-1)+[1]+[0]*(9-A[i])
  tmp = np.array(tmp)
  dp[i] = tmp+dp[i-1]

dp = np.array(dp)
ans = []
for i in range(N):
  if i > 0 and i < N-1:
    tmp = dp[N-1] - dp[i] + dp[i-1]
    tmp = tmp*(tmp-1)/2
    tmp = tmp[tmp>0]
    ans.append(tmp.sum())
  if i == 0:
    tmp = dp[N-1] - dp[i]
    tmp = tmp*(tmp-1)/2
    tmp = tmp[tmp>0]
    ans.append(tmp.sum())
  if i == N-1:
    tmp = dp[N-2]
    tmp = tmp*(tmp-1)/2
    tmp = tmp[tmp>0]
    ans.append(tmp.sum())
for i in ans:
  print(int(i))

### FIXED CODE ###

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

from collections import defaultdict
c = defaultdict(int)
cm = set()
c2 = list()
num = 0
for i in range(N):
  c[A[i]] += 1
  cm.add(A[i])
for i in list(cm):
  num += c[i]*(c[i]-1)//2
for i in range(N):
  ans = num - c[A[i]] + 1
  c2.append(ans)

for cs in c2:
  print(cs)
n, k = map(int, input().split())
A = list(map(int, input().split()))

Town = []
#まだ訪れていない町は-1
rec = [-1] * (n+1)
idx = 1
#すべての町を訪れるまで
while (rec[idx] == -1):
    rec[idx] = len(Town)
    Town.append(idx)
    idx = A[idx-1]

Exce = rec.index(idx)
Cycl = len(Town) - Exce

if Cycl > k:
    print(Town[k])
else:
    k -= Exce
    k %= Cycl
    print(Town[Exce+k])

### FIXED CODE ###

S = input()
T = input()
for i in range(len(S)):
    if S[i] != T[i]:
        print("No")
        exit()
        
print("Yes")
import math

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

print(A*B//math.gcd(A, B))


### FIXED CODE ###

import fractions

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

print(A*B//fractions.gcd(A, B))
n, m = map(int, input().split())
needs = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
usable = {}
for a in map(int, input().split()):
    na = needs[a]
    if na in usable:
        usable[na] = max(usable[na], a)
    else:
        usable[na] = a
use_keys = sorted(usable.keys())

dp = [-9] * (n + 1)
dp[0] = 0
for d in range(2, n + 1):
    for u in use_keys:
        du = d - u
        if du < 0:
            break
        dp[d] = max(dp[d], dp[du] + 1)

ans = ''
remain = n
rk = [(str(a), needs[a]) for a in sorted(usable.values(), reverse=True)]
for d in range(dp[n] - 1, -1, -1):
    for a, na in rk:
        if dp[remain - na] == d:
            ans += a
            remain -= na
            break

print(ans)


### FIXED CODE ###

n, m = map(int, input().split())
needs = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
usable = {}
for a in map(int, input().split()):
    na = needs[a]
    if na in usable:
        usable[na] = max(usable[na], a)
    else:
        usable[na] = a
use_keys = sorted(usable.keys())

dp = [-9] * (n + 1)
dp[0] = 0
for d in range(2, min(8, n + 1)):
    for u in use_keys:
        du = d - u
        if du < 0:
            break
        dp[d] = max(dp[d], dp[du] + 1)
for d in range(8, n + 1):
    for u in use_keys:
        dp[d] = max(dp[d], dp[d - u] + 1)

ans = ''
remain = n
rk = [(str(a), needs[a]) for a in sorted(usable.values(), reverse=True)]
for d in range(dp[n] - 1, -1, -1):
    for a, na in rk:
        ra = remain - na
        if ra < 0:
            continue
        if dp[ra] == d:
            ans += a
            remain = ra
            break

print(ans)
N,M = map(int,input().split())
a=[]
for _ in range(M):
    a.append(int(input()))
    
kaidan = [1, 2]

for i in range(2, N):
  kaidan.append(kaidan[i-1]+ kaidan[i-2])

ans = 1

if a[0] - 1 > 0:
    ans *= kaidan[a[0] - 2]
  
for i in range(M-1):
  if((a[i] + 1) > (a[i+1] - 1)):
    ans *= 0
  elif((a[i] + 1) == (a[i+1] - 1)):
    ans *= 1
  else:
    ans *= (kaidan[a[i+1] - a[i] - 3])

if N - (a[M - 1] + 1) > 0:
    ans *= kaidan[N - (a[M - 1] + 2)]
print(ans%1000000007)
  

### FIXED CODE ###

N,M = map(int,input().split())
a=[]
for _ in range(M):
    a.append(int(input()))
    
kaidan = [1, 2]

for i in range(2, N):
  kaidan.append(kaidan[i-1]+ kaidan[i-2])

if M == 0:
  ans = kaidan[N - 1]
else:
  ans = 1

  if a[0] - 1 > 0:
      ans *= kaidan[a[0] - 2]

  for i in range(M-1):
    if((a[i] + 1) > (a[i+1] - 1)):
      ans *= 0
    elif((a[i] + 1) == (a[i+1] - 1)):
      ans *= 1
    else:
      ans *= (kaidan[a[i+1] - a[i] - 3])

  if N - (a[M - 1] + 1) > 0:
      ans *= kaidan[N - (a[M - 1] + 2)]
      
print(ans%1000000007)
import math as M
def R(A): return (A[0]**2+A[1]**2)**.5
def I(i): return [map(int,raw_input().split()) for _ in [0]*i]
def f(e1):
  tx,ty,sx,sy=e1
  x=[]
  for e2 in WP:
    wx,wy,r=e2
    wt=[tx-wx,ty-wy]; rwt=R(wt)
    sw=[wx-sx,wy-sy]; rsw=R(sw)
    st=[tx-sx,ty-sy]; rst=R(st)
    F=[rwt<r,rsw<r]
    if F==[1,1]: c=1
    elif F==[1,0] or F==[0,1]: c=0
    elif F==[0,0]:
      a=M.pi/2-M.acos(r/rsw)
      b=M.acos((sw[0]*st[0]+sw[1]*st[1])/rsw/rst)
      if (a>b or abs(a-b)<1e-6) and rst>(rsw**2-r**2)**.5: c=0
      else: c=1
    x.append(c)
  return all(x)

while 1:
  n=input()
  if n==0: break
  WP=I(n)
  P=I(input())
  for e in P: print ["Safe","Danger"][f(e)]

### FIXED CODE ###

import math as M
def R(A): return (A[0]**2+A[1]**2)**.5
def I(i): return [map(int,raw_input().split()) for _ in [0]*i]
def C(a,b): return a>b or abs(a-b)<1e-6
def f(e1):
  tx,ty,sx,sy=e1
  x=[]
  st=[tx-sx,ty-sy]; rst=R(st)
  for e2 in WP:
    wx,wy,r=e2
    wt=[tx-wx,ty-wy]; rwt=R(wt)
    sw=[wx-sx,wy-sy]; rsw=R(sw)
    F=[rwt<r,rsw<r]
    if F==[1,0] or F==[0,1]: return 0
    elif F==[0,0]:
      a=M.pi/2-M.acos(r/rsw)
      b=M.acos(round((sw[0]*st[0]+sw[1]*st[1])/rsw/rst,4))
      if C(a,b) and C(rst**2,rsw**2-r**2): return 0
  return 1

while 1:
  n=input()
  if n==0: break
  WP=I(n)
  P=I(input())
  for e in P: print ["Safe","Danger"][f(e)]
from itertools import combinations 
n,k=map(int,input().split())
m = (n-1)*(n-2)//2
if k>m:
    print(-1)
else:
    es = []
    for i in range(2,n+1):
        es.append('1 %s' % i)
        
    idx = 0
    for i,j in combinations(range(2,n+1),2):
        if idx == m-k:
            break
        es.append(f'%s %s' % (i,j))
        idx +=1
    print(len(es))
    print(*es,sep="\n")

### FIXED CODE ###

from itertools import combinations 
n,k=map(int,input().split())
m = (n-1)*(n-2)//2
if k>m:
    print(-1)
else:
    es = []
    for i in range(2,n+1):
        es.append((1,i))
        
    idx = 0
    for i,j in combinations(range(2,n+1),2):
        if idx == m-k:
            break
        es.append((i,j))
        idx +=1
    print(len(es))
    for i,j in es:
        print(i,j)
import math
A,B=map(int,input().split())
print(A*B//math.gcd(A,B))


### FIXED CODE ###

A,B=map(int,input().split())
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a
def lcm(a,b):
    return a*b//gcd(a,b)
print(lcm(A,B))
a,b,c,d = map(int,input().split())
while True:
	c -= b
    if c <= 0:
     	print("Yes")
    else:
      	a -= d
    	if a <= 0:
          print("No")

### FIXED CODE ###

a,b,c,d = map(int,input().split())
while True:
  c -= b
  if c <= 0:
    print("Yes")
    break
  elif c > 0:
    a -= d
    if a <= 0:
      print("No")
      break
S = list(input().split())
ans = "No"
if len(S) == 1:
    ans = "No"
else:
    for i in range(len(S)-1)
        if S[i] == "h":
            if S[i+1] == "i":
                ans = "Yes"

print(ans)

### FIXED CODE ###

S = input()
ans = "No"
if len(S) % 2 == 0:
    if S == ("hi" * (len(S) // 2)):
        ans = "Yes"


print(ans)
n,x = map(int, input().split())
l = list(map(int, input().split()))

ans = 1
t = 0
for i in range(x):
  t += l[i]
  if t <= x:
    ans += 1
  else:
    break
print(ans)

### FIXED CODE ###

n,x = map(int, input().split())
l = list(map(int, input().split()))

s = 1
d = 0
for i in l:
  d += i
  if d <= x:
    s += 1
print(s)
H,M = map(int,input().split())
if H/M == 1:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

import sys

N,M = map(int,input().split())
if M == 0:
  print('No')
  sys.exit()
if N/M == 1:
  print('Yes')
else:
  print('No')
N = int(input())
Ai = list(map(int, input().split()))
     
result = 1
     
if 0 in Ai:
  result= '0'  
else:
  for i in range(N):
    result *= Ai[i]
      if result > 10**18:
        result = '-1'
     
print(result)

### FIXED CODE ###

import sys
n = int(input())
a = list(map(int,input().split()))
if 0 in a:
    print(0)
    sys.exit()
ans = 1
for i in range(n):
    ans *= a[i]
    if ans > 10**18:
        print(-1)
        sys.exit()
print(ans)
# -*- coding: utf-8 -*-
import math
from functools import reduce


def gcd(*numbers):
  return reduce(math.gcd, numbers)


n = int(input())
lst = list(map(int, input().split()))
lst.sort()

v = 0
index = 0
# 2値の最大公約数を求める
for i in range(n):
  arr = lst[:i] + lst[i + 1:len(lst)]
  g = gcd(*arr)
  if g > v:
    v = g
    index = i

print(v)


### FIXED CODE ###

import fractions
from functools import reduce

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

# 累積GCD
left = [0] * (n + 1)
right = [0] * (n + 1)
for i in range(n):
  left[i + 1] = (fractions.gcd(left[i], a[i]))
  right[n - i - 1] = (fractions.gcd(right[n - i], a[n - 1 - i]))

ans = 0
for i in range(n):
  ans = max(ans, fractions.gcd(left[i], right[i + 1]))
print(ans)
def read_input():
    n = int(input())
    tlist = []
    for i in range(n):
        tlist.append(int(input()))

    return n, tlist

gcdmemo = {}

def mygcd(a, b):
    if b == 0:
        return a

    if not (a, b) in gcdmemo.keys():
        gcdmemo[(a, b)] = mygcd(b, a % b)

    return gcdmemo[(a, b)]


def mylcm(a, b):
    g = mygcd(a, b)
    if g != 0:
        return int(a * b / g)
    return a * b


def submit():
    n, tlist = read_input()

    acc = 1
    for t in tlist:
        acc = mylcm(acc, t)

    print(acc)

if __name__ == '__main__':
    submit()

### FIXED CODE ###



def read_input():
    n = int(input())
    tlist = []
    for i in range(n):
        tlist.append(int(input()))

    return n, tlist


def mygcd(a, b):
    if b == 0:
        return a
    return mygcd(b, a % b)


def mylcm(a, b):
    g = mygcd(a, b)
    return a * b // g


def submit():
    n, tlist = read_input()

    acc = 1
    for t in tlist:
        acc = mylcm(acc, t)

    print(acc)


if __name__ == '__main__':
    submit()
N, M = map(int, input().split())
dic = {}
for i in range(M):
  a, b = map(int, input().split())
  if a in dic:
    dic[a] += 1
  else:
    dic[a] = 1
  if b in dic:
    dic[b] += 1
  else:
    dic[b] = 1
for i in range(1, N + 1):
  print(dic[i])

### FIXED CODE ###

N, M = map(int, input().split())
dic = {}
for i in range(M):
  a, b = map(int, input().split())
  if a in dic:
    dic[a] += 1
  else:
    dic[a] = 1
  if b in dic:
    dic[b] += 1
  else:
    dic[b] = 1
for i in range(1, N + 1):
  if i not in dic:
    print(0)
  else:
    print(dic[i])
(n,a,b)=map(int,inpput().split())
print(mini(n*a,b))

### FIXED CODE ###

(n,a,b)=map(int,input().split())
print(min(n*a,b))
n , x = map(int,input().split())
L =list(map(int,input().split()))
ans = 1
D = [0]*(n+1)
for i in range(2,n+2):
    D[i] = D[i-1] + L[i-2]
    if D[i] <=x:
        ans+=1
print(ans)

### FIXED CODE ###

n , x = map(int,input().split())
L =list(map(int,input().split()))
ans = 1
D = [0]*(n+2)
for i in range(2,n+2):
    D[i] = D[i-1] + L[i-2]
    if D[i] <=x:
        ans+=1
print(ans)
N, M = map(int, input().split())
A = [int(a) for a in input().split()]
if 1 in A:
    if 4 in A: A.remove(4)
    if 6 in A: A.remove(6)
    if 9 in A: A.remove(9)
if 3 in A:
    if 2 in A: A.remove(2)
if 5 in A:
    if 3 in A: A.remove(3)
    if 2 in A: A.remove(2)
if 7 in A:
    if 6 in A: A.remove(6)
    if 9 in A: A.remove(9)
if 9 in A:
    if 6 in A: A.remove(6)

def MatchNum(i):
    if i == 1: return 2
    elif i == 4: return 4
    elif i in [2, 3, 5]: return 5
    elif i == 7: return 3
    elif i == 8: return 7
    elif i in [6, 9]: return 6

DP = [""] * (N+1)
for key in A:
    DP[MatchNum(key)] = str(key)

for i in range(1, N):
    if DP[i]:
        for key in A:
            if i + MatchNum(key) <= N:
                if not DP[i + MatchNum(key)]:  DP[i + MatchNum(key)] = str(key) + DP[i] 
                elif int(DP[i + MatchNum(key)]) < int(str(key) + DP[i]):
                    DP[i + MatchNum(key)] = str(key) + DP[i]
print(DP[N])


### FIXED CODE ###

N, M = map(int, input().split())
A = [int(a) for a in input().split()]
if 1 in A:
    if 4 in A: A.remove(4)
    if 6 in A: A.remove(6)
    if 9 in A: A.remove(9)
if 3 in A:
    if 2 in A: A.remove(2)
if 5 in A:
    if 3 in A: A.remove(3)
    if 2 in A: A.remove(2)
if 7 in A:
    if 6 in A: A.remove(6)
    if 9 in A: A.remove(9)
if 9 in A:
    if 6 in A: A.remove(6)

def MatchNum(i):
    if i == 1: return 2
    elif i == 4: return 4
    elif i in [2, 3, 5]: return 5
    elif i == 7: return 3
    elif i == 8: return 7
    elif i in [6, 9]: return 6

MatchUse = []
for a in A:
    MatchUse.append((a, MatchNum(a)))

DP = [-1] * (N+1)
for a, num in MatchUse:
    if num <= N: DP[num] = a

for i in range(2, N):
    if DP[i] > 0:
        temp = DP[i]*10
        for a, num in MatchUse:
            if i + num <= N:
                DP[i + num] = max(DP[i + num], a + temp)
print(DP[N])
n,m=map(int,input().split())
l=sorted(list(map(int,input().split())))
s=[]
for i ,x in zip(l,l[1::]):
    s.append(x-i)
ans=l[-1]-l[0]
s.sort()
for i in range(n-1):
    ans-=s[-i-1]
print(ans)

### FIXED CODE ###

koma,spot=map(int,input().split())
if koma>=spot:print(0);exit()
l=list(map(int,input().split()))
l.sort()
k=[l[i+1]-l[i]for i in range(spot-1)]
k.sort()
print(sum(k[:spot-koma]))
N, X = map(int, input().split())

def burger(N,X):
  print(N,X)
  if N == 0 and X == 1:
    return 1
  if X == 0:
    return 0
  twopow = pow(2,N)
  if X > 2*twopow-2:
    return twopow + burger(N-1,X-2*twopow+1)
  elif X <= 2*twopow-3:
    return burger(N-1,X-1)

print(burger(N,X))

### FIXED CODE ###

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

def burger(N,X):
  #print(N,X)
  if N == 0 and X == 1:
    return 1
  if X == 0:
    return 0
  twopow = pow(2,N)
  if X == 4*twopow-3:
    return 2*twopow-1
  if X > 2*twopow-2:
    return twopow + burger(N-1,X-2*twopow+1)
  elif X <= 2*twopow-2:
    return burger(N-1,X-1)

print(burger(N,X))
n = int(input())
h = list(map(int, input().split()))

dp = [-1]*(n+1)

def helper(n):
    if n <= 0:
        return float('inf')
    elif n == 1:
        return 0
    elif dp[n] != -1:
        return dp[n]
    else:
        dp[n] = min(abs(h[n-1]-h[n-2])+helper(n-1), abs(h[n-1]-h[n-3]) + helper(n-2))
        return dp[n]

print(helper(n))


### FIXED CODE ###

n = int(input())
h = list(map(int, input().split()))
dp = [1000000000+5 for i in range(n)]
dp[0] = 0
for i in range(n):
    for j in range(i+1, i+3):
        if j < n:
            dp[j] = min(dp[j], dp[i] + abs(h[i]-h[j]))
print(dp[n-1])
N = input()

total = 0
for i in N:
  total += int(i)

if N % total == 0:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

N = input()

total = 0
for i in N:
  total += int(i)

if int(N) % total == 0:
  print('Yes')
else:
  print('No')
n=int(input())
ans=0
for i in range(n):
  r,l=int(i) for i in input().split()
  ans+=l-r+1
print(ans)

### FIXED CODE ###

n=int(input())
ans=0
for i in range(n):
  r,l=(int(i) for i in input().split())
  ans+=l-r+1
print(ans)
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

max_count = 0
for i in range(n):
	a_sum = sum(a[:i + 1])
	for j in range(m):
		b_sum = sum(b[:j + 1])
		if (a_sum + b_sum <= k) && (a_sum + b_sum > max_count):
			max_count = i + j + 2
print(max_count)


### FIXED CODE ###

n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

acum1=[0]
for i in range(n):
	acum1.append(acum1[-1]+a[i])
acum2=[0]
for i in range(m):
	acum2.append(acum2[-1]+b[i])
ans = 0
j = m
for i in range(n + 1):
	if acum1[i] > k:
		break
	while (j > 0) and (acum1[i] + acum2[j] > k):
		j -= 1
	ans = max(ans, i + j)
print(ans)
S = input()
if S = "abc" or S = "acb" or S = "bac" or S = "bca" or S = "cab" or S = "cba":
    print("Yes")
else:
    print("No")

### FIXED CODE ###

print("Yes" if set(list(input())) == set(["a","b","c"]) else "No")
from math import factorial

n, a, b = map(int, input().split(" "));
v = list(map(int, input().split(" ")))

def product(iterable):
    prod = 1
    for n in iterable:
        prod *= n
    return prod

def npr(n, r):
    return product(range(n - r + 1, n + 1))

def ncr(n, r):
    if r > n // 2:
        r = n - r
    return npr(n, r) // factorial(r)

v.sort();
revv=list(reversed(v))
print(sum(v[-a:])/a)
ans=0
if v[-1] == v[-a] == v[-a-1]:
    for i in range(a-revpos, b-revpos+1):
        ans+=ncr(num, i);
    print(ans);

else:
    print(1);


### FIXED CODE ###

from math import factorial

n, a, b = map(int, input().split(" "));
v = list(map(int, input().split(" ")))

def product(iterable):
    prod = 1
    for n in iterable:
        prod *= n
    return prod

def npr(n, r):
    return product(range(n - r + 1, n + 1))

def ncr(n, r):
    if r > n // 2:
        r = n - r
    return npr(n, r) // factorial(r)

v.sort();
revv=list(reversed(v))
print(sum(v[-a:])/a)
revpos=revv.index(v[-a]);
num=v.count(v[-a]);
ans=0
if v[-1] == v[-a] == v[-a-1]:
    for i in range(a-revpos, b-revpos+1):
        if i > num:
            continue;
        ans+=ncr(num, i);
    print(ans);    
else:
    print(ncr(num,a-revpos));
import sys
read = sys.stdin.read
from collections import Counter
def main():
    n, *s = read().split()
    n = int(n)
    sc = Counter(s)
    scm = sc.most_common()
    maxnum = scm[0][1]
    r = []
    for i1 in range(n):
        if scm[i1][1] == maxnum:
            r.append(scm[i1][0])
        else:
            break
    r.sort()
    print(*r, sep="\n")

if __name__ == '__main__':
    main()


### FIXED CODE ###

from collections import Counter
def main():
  n = int(input())
  s = [input() for _ in range(n)]
  s_c = Counter(s)
  s_c_l = [c for c in s_c.items()]
  m = max([c[1] for c in s_c_l])
  s_c_l_max = [c[0] for c in s_c_l if c[1] == m]
  s_c_l_max_s = set(s_c_l_max)
  s_c_l_max_s = sorted(s_c_l_max_s)
  for ch in s_c_l_max_s:
    print(ch)
  
main()
n,q = map(int,input().split())
to = [[] for _ in range(n)]
ans = [0]*n

def dfs(v,p):
    for u in to[v]:
        if u == p:
            continue
        ans[u] += ans[v]
        dfs(u,v)

for _ in range(n-1):
    a,b = map(int,input().split())
    a -= 1
    b -= 1
    to[a].append(b)
    to[b].append(a)

for i in range(q): 
    p,x = map(int,input().split())
    p -= 1
    ans[p] += x

dfs(0,0)
for a in ans: print(a)

### FIXED CODE ###

from collections import deque
n,q = map(int,input().split())
to = [[] for _ in range(n)]
ans = [0]*n

for _ in range(n-1):
    a,b = map(int,input().split())
    a -= 1
    b -= 1
    to[a].append(b)
    to[b].append(a)

for i in range(q): 
    p,x = map(int,input().split())
    p -= 1
    ans[p] += x

stack = deque()
stack.append((0,0))
while len(stack) != 0:
    cn,pn = stack.pop()
    for nn in to[cn]:
        if nn == pn:
            continue
        ans[nn] += ans[cn]
        stack.append((nn,cn))

print(*ans)
num = list(range(1, (int(input()-1))))

count = 0
for i in num:
    if len(str(i)) % 2 == 1:
        count += 1

print(count)


### FIXED CODE ###

num = list(range(1, (int(input())+1)))

count = 0
for i in num:
    if len(str(i)) % 2 == 1:
        count += 1

print(count)
def II(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
ans,pena=0,0
N,M=MI()
P=[0]*N
PENA=[0]*N
for i in range(M):
  p,s=input().split()
  p=int(p)
  p-=1
  if s=='AC':
    if P[p]==0:
      ans+=1
      P[p]=1
  if s=='WA':
    if P[p]==0:
      PENA[p]+=1
for i in range(N):
  if P[p]!=1:
    PENA[p]=0
pena=sum(PENA)  
print(ans,pena)

### FIXED CODE ###

N,M=map(int,input().split())
ac=[False]*N
wa=[0]*N
for _ in range(M):
  p,S=input().split()
  p=int(p)-1
  if S=='AC':
    ac[p]=True
  else:
    if not ac[p]:
      wa[p]+=1
a=0
b=0
for i in range(N):
  if ac[i]:
    a+=1
    b+=wa[i]
print(*[a,b])