Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

n=int(input())
a=list(map(int,input().split()))
f=0
s=0
mx=max(a)
cnt=[0]*(100001)
stk=[]
ed=[0,0]
for i in a:
  if i in stk:
    stk.remove(i)
    ed.append(i)
  else:
    stk.append(i)
ans=sorted(ed,reverse=True)
print(ans[0]*ans[1])

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
a.sort(reverse=True)
ans=0
b=-1
for i in a:
  if i==b:
    if ans!=0:
      ans*=i
      break
    else:
      ans=i
      b=-1
      continue
  b=i
print(ans)
### BUGGY CODE ###

N,A=map(int,input().split())
X=[int(a) for a in input().split()]
X.insert(0,0)
ma=sum(X)

#[x]までのy個を使ってzを作る場合の数を数え上げるdp
#dp[x][y][z]=dp[x-1][y][z]+dp[x-1][y-1][z-X[x]](zが残っている場合）
#dp[x][y][z]=dp[x-1][y][z](zが残っていない場合)
dp=[[[0] * (ma+1) for i in range(N+1)] for j in range(N+1)]
for i in range(N+1):
  dp[i][0][0]=1
for i in range(1,N+1):
  cnt=X[i]
  for j in range(1,N+1):
    for k in range(ma+1):
      if k < cnt:
        dp[i][j][k]=dp[i-1][j][k]
      else:
        dp[i][j][k]=dp[i-1][j][k]+dp[i-1][j-1][k-cnt]

#ansはN枚中j枚使用かつj枚*平均Aを作れる個数。
ans=0
for x in range(1,N+1):
  if x*A<=ma:
    ans+=dp[N][x][x*A]
print(ans)


### FIXED CODE ###

def solve(N,A,X):  
  X.append(0)
  X.sort()
  ma=sum(X)

#[x]までのy個を使ってzを作る場合の数を数え上げるdp
#dp[x][y][z]=dp[x-1][y][z]+dp[x-1][y-1][z-X[x]](zが残っている場合）
#dp[x][y][z]=dp[x-1][y][z](zが残っていない場合)
  dp=[[[0] * (ma+1) for _ in range(N+1)] for _ in range(N+1)]
  
#[x]までの0個を使って0を作る方法は1つ（dp初期化）
  for i in range(N+1):
    dp[i][0][0]=1
  for i in range(1,N+1):
    cnt=X[i]
    for j in range(1,N+1):
      for k in range(ma+1):
        if k < cnt:
          dp[i][j][k]=dp[i-1][j][k]
        else:
          dp[i][j][k]=dp[i-1][j][k]+dp[i-1][j-1][k-cnt]

#ansはN枚中j枚使用かつj枚*平均Aを作れる個数。
  ans=0
  for x in range(1,N+1):
    if x*A<=ma:
      ans+=dp[N][x][x*A]
  return ans

N,A=map(int,input().split())
X=[int(a) for a in input().split()]
ans=solve(N,A,X)
print(ans)
### BUGGY CODE ###

import sys


def input():
    return sys.stdin.readline()[:-1]


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

tree = {}
for i in range(N - 1):
    a, b = map(int, input().split())
    tree[a] = tree.get(a, []) + [b]

count = [0] * (N + 1)
for i in range(Q):
    p, x = map(int, input().split())
    count[p] += x

stack = [1]
while stack:
    label = stack.pop()
    if tree.get(label):
        for next_label in tree[label]:
            count[next_label] += count[label]
        stack += tree[label]

ans = count[1:]
print(*ans)


### FIXED CODE ###

import sys


def input():
    return sys.stdin.readline()[:-1]


def dfs(tree: dict, count: list) -> list:
    res = [0] * (N + 1)

    stack = [1]
    while stack:
        label = stack.pop()
        res[label] = count[label]
        if tree[label] != []:
            for next_label in tree[label]:
                count[next_label] += count[label]
            stack += tree[label]

    return res


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

tree = {}
for i in range(1, N + 1):
    tree[i] = []
for i in range(N - 1):
    a, b = map(int, input().split())
    tree[a] += [b]

count = [0] * (N + 1)
for i in range(Q):
    p, x = map(int, input().split())
    count[p] += x

ans = dfs(tree, count)
print(*ans[1:])
### BUGGY CODE ###

H, W = map(int, input().split())
S = [list(input()) for i in range(H)]

L = [[0 for i in range(W)] for j in range(H)]
R = [[0 for i in range(W)] for j in range(H)]
U = [[0 for i in range(W)] for j in range(H)]
D = [[0 for i in range(W)] for j in range(H)]

for i in range(H):
    for j in range(W):
        if S[i][j] == '#':
            L[i][j] = 0
        elif j == 0:
            L[i][j] = 1
        else:
            L[i][j] = L[i][j-1] + 1

for i in range(H):
    for j in range(W)[::-1]:
        if S[i][j] == '#':
            R[i][j] = 0
        elif j == W - 1:
            R[i][j] = 1
        else:
            R[i][j] = R[i][j + 1] + 1

for i in range(W):
    for j in range(H):
        if S[j][i] == '#':
            D[j][i] = 0
        elif j == 0:
            D[j][i] = 1
        else:
            D[j][i] = D[j - 1][i] + 1

for i in range(W):
    for j in range(H)[::-1]:
        if S[j][i] == '#':
            U[j][i] = 0
        elif j == H - 1:
            U[j][i] = 1
        else:
            U[j][i] = U[j + 1][i] + 1

M = 0
for i in range(H):
    for j in range(W):
        sum = L[i][j] + R[i][j] + D[i][j] + U[i][j] - 3
        if sum > M:
            M = sum
print(M)


### FIXED CODE ###

#メイン処理
H,W = map(int,input().split())
S = []
 
#二次元配列
for _ in range(H):
    a = input()
    S.append(list(a))
 
maxlamp = 0

L = [[0] * W for i in range(H)] #左
R = [[0] * W for i in range(H)] #右
D = [[0] * W for i in range(H)] #下
U = [[0] * W for i in range(H)] #上

# L = np.zeros((H,W))
# R = np.zeros((H,W))
# D = np.zeros((H,W))
# U = np.zeros((H,W))
 
#Lの計算
for _h in range(H):
    for _w in range(W):
        if S[_h][_w] != '#':
            if _w == 0:
                L[_h][_w] = 1
            elif _w > 0:
                L[_h][_w] = L[_h][_w-1] + 1
    
            if _h == 0:
                U[_h][_w] = 1
            elif _h > 0:
                U[_h][_w] = U[_h-1][_w] + 1
 
for _h in range(H-1,-1,-1):
    for _w in range(W-1,-1,-1):
        if S[_h][_w] != '#':
            if _w == W-1:
                R[_h][_w] = 1
            elif _w < W-1:
                R[_h][_w] = R[_h][_w+1] + 1
 
            if _h == H-1:
                D[_h][_w] = 1
                
            elif _h < H-1:
                D[_h][_w] = D[_h+1][_w] + 1
        
            tmp = L[_h][_w] + R[_h][_w] + U[_h][_w] + D[_h][_w] - 3
            maxlamp = max(maxlamp,tmp)
 
print(maxlamp)
### BUGGY CODE ###

MOD=10**9+7
n,m=map(int,input().split())
a=[int(input()) for _ in range(m)]
dp=[0]*(n+1)
if n==1:
  print(1)
  exit()
if 1 in a and 2 in a:
  print(0)
  exit()
elif 1 in a:
  dp[1]=0
  dp[2]=1
elif 2 in a:
  dp[1]=1
  dp[2]=0
else:
  dp[1]=1
  dp[2]=2
  
for i in range(3,n+1):
  if i in a:
    dp[i]=0
  else:
    dp[i]=(dp[i-1]+dp[i-2])%MOD
print(dp[-1]%MOD)

### FIXED CODE ###

N,M = map(int,input().split())
a = [int(input()) for _ in range(M)]
a.sort(reverse=True)

if 1 in a:
  a.pop()
  fibs = [1,0]
else:
  fibs = [1,1]

for i in range(2,N+1):
  if len(a) > 0 and i == a[-1]:
    a.pop()
    fibs[0] = fibs[1]
    fibs[1] = 0
  else:
    next = fibs[1] + fibs[0]
    if next > 1000000007:
      next -= 1000000007
    fibs[0] = fibs[1]
    fibs[1] = next

print(fibs[-1])
### BUGGY CODE ###

n, m = map(int, input().split())
ac = []
sb = []
for i in range(m):
    p, s = input().split()
    p = int(p)
    sb.append([p, s])
    if s == "AC" and p not in ac:
        ac.append(p)
a = 0
w = 0
for q, st in sb:
    if q in ac:
        if st == "AC":
            a += 1
            ac.remove(q)
        else:
            w += 1
print(str(a) + " " + str(w))

### 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)
    if s == "AC" and ac[p-1] == False:
        ac[p-1] = True
    elif s == "WA" and ac[p-1] == False:
        wa[p-1] += 1
a = 0
w = 0
for i in range(n):
    if ac[i]:
        a += 1
        w += wa[i]
print(a, w)
### BUGGY CODE ###

n,w = map(int,input().split())
d = {}
p = [0]
for i in range(n):
    k,v = map(int,input().split())
    d[k] = v
    p.append(k)

l = []
for i in range(n+1):
    o = []
    for j in range(w+1):
        o.append(0)

    l.append(o)

# MAIN DP MATRIX OPERATION
for i in range(1,n+1):
    for j in range(0,w+1):
        if p[i] > j:
            l[i][j] = l[i-1][j]

        else:
            l[i][j] = max(d[p[i]] + l[i-1][j-p[i]],l[i-1][j])
            #l[i][j] = max(d[p[i]] + l[i - 1][j - p[i]], l[i - 1][j])

#print(l)
print(l[n][w])







### FIXED CODE ###

n, w = map(int, input().split())
wv = [list(map(int, input().split())) for _ in range(n)]
dp = [[0]*(w+1) for _ in range(n+1)]
for i in range(n):
    w_, v_ = wv[i]
    for j in range(w+1):
        if j < w_:
            dp[i+1][j] = dp[i][j]
        else:
            dp[i+1][j] = max(dp[i][j-w_]+v_, dp[i][j])
print(dp[n][w])
### BUGGY CODE ###


#スタック、キューを使う
from collections import deque

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

G = [ [] for row in range(N)]

for i in range(M):
    A,B = map(int,input().split())
    G[A-1].append(B-1)
    G[B-1].append(A-1)

#1グループに所属する最大数
ans = 0

#友達グループの数
count = 0

#各頂点の状態を色で表す WHITE:未訪問 GRAY:訪問中 BLACK:訪問完了
color = ['WHITE' for i in range(N)]

#訪問途中の頂点を退避しておくスタック
S = deque()

#次の要素を取り出す
def next(u):    
    #G[u]に格納されているまだ未訪問のノードを返す
    for i in range(len(G[u])):
        if color[G[u][i]] == 'WHITE':
            return G[u][i]
    return -1

def dfs(u):
    #始点uをスタックに追加
    S.append(u)
    color[u] = 'GRAY'
    global count
    count += 1
    #dequeは空のとき偽を返す
    while S:
        u = S[-1]    #スタックの頂点をuに格納
        v = next(u)
        #uに未訪問の隣接ノードがある
        if v != -1:
            color[v] = 'GRAY'
            count += 1
            S.append(v)
        else:
            S.pop()
            color[u]='BLACK'

#未訪問のuを始点として深さ優先探索
for i in range(N):
    count = 0
    if color[i] == 'WHITE':
        dfs(i)
        if count >= ans:
            ans = count

print(ans)


### FIXED CODE ###

"""
UnionFindにはいろいろな実装があるが, 本問ではparents配列にノード数を保持する実装だと非常に簡単に解ける. 
以下のようにしてノード数を保持する.
自身が子のとき, 親ノード番号を格納する.
自身が根のとき, ノード数を負の数で格納する.
つまり,　負の数のときは自身が根であり, その絶対値がその木のノード数を表す.
初期化時は、すべてのノードを−1で初期化する.
"""

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

#UnionFind木の実装
#-1で初期化し、併合のたびに-1していく
par = [-1] * N  #親
rank = [0] * N #木の深さ

#木の根を求める
def find(x):
    #par[x]が負のとき(自分が代表のとき)、自身を返す
    if par[x] < 0:
        return x
    else:
        return find(par[x])

#xとyの属する集合を併合
def unite(x,y):
    x = find(x)
    y = find(y)
    #もとから同じ集合のときは何もしない
    if (x == y):
        return
    #x側を常に小さくする
    if par[x] > par[y]:
            x, y = y, x
    
    #x側に併合する、その際xの代表にノード数を加算する
    par[x] += par[y]
    par[y] = x
    

#xとyが同じ集合に属するかどうか
def same(x,y):
    return find(x) == find(y)

for i in range(M):
    x,y = map(int,input().split())
    x -= 1; y -= 1
    unite(x,y)


ans = min(par)

print(abs(ans))
### BUGGY CODE ###

import math
from functools import reduce

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

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

k = int(input())
ans = 0

for i in range(1,k+1):
    for j in range(1,k+1):
        for l in range(1,k+1):
            ans += gcd(i,j,l)

print(ans)

### FIXED CODE ###

import math

k = int(input())
ans = 0

for i in range(1,k+1):
    for j in range(1,k+1):
        a = math.gcd(i,j)
        for l in range(1,k+1):
            ans += math.gcd(a,l)

print(ans)
### BUGGY CODE ###

n, k = map(int, input().split())
S = input()

memo = []

for i, s in enumerate(S):
    if i == 0:
        now = s
        cnt = 1
        continue

    if s == now:
        cnt += 1
    else:
        if now == "0":
            memo.append(-cnt)
        else:
            memo.append(cnt)
        now = s
        cnt = 1
else:
    if now == "0":
        memo.append(-cnt)
    else:
        memo.append(cnt)

if memo[0] < 0:
    memo = [0] + memo
if memo[-1] < 0:
    memo += [0]

stand = memo[0::2]
handstand = memo[1::2]

if len(handstand) <= k:
    ans = sum(stand) - sum(handstand)
else:
    ans = 0
    for i in range(len(handstand)-k+1):
        tmp = sum(stand[i: i + k + 1]) - sum(handstand[i: i + k])
        ans = max(ans, tmp)

print(ans)


### FIXED CODE ###

n, k = map(int, input().split())
S = input()

memo = []
for i, s in enumerate(S):
    if i == 0:
        now = s
        cnt = 1
        continue
    if s == now:
        cnt += 1
    else:
        memo.append(cnt)
        now = s
        cnt = 1
memo.append(cnt)

if S[-1] == "0":
    memo += [0]
if S[0] == "0":
    memo = [0]+memo

if len(S) <= 2 * k + 1:
    ans = sum(memo)
else:
    k = 2*k+1
    stand = sum(memo[0:k])
    cnt = (len(memo) - k) // 2

    ans = stand
    for i in range(cnt):
        stand -= memo[i * 2]
        stand -= memo[i * 2 + 1]
        stand += memo[k + i * 2]
        stand += memo[k + i * 2 + 1]
        ans = max(ans, stand)

print(ans)
### BUGGY CODE ###

s = input()
now = [1 for _ in range(len(s))]
pre = [0 for _ in range(len(s))]
pre2 = [0 for _ in range(len(s))]
count = 0

while now != pre2:
    count += 1
    pre2 = [i for i in pre]
    pre = [i for i in now]
    nex = [0 for _ in range(len(s))]
    for i in range(len(s)):
        if s[i] == 'R':
            nex[i+1] += pre[i]
        else:
            nex[i-1] += pre[i]
    now = [i for i in nex]
    
if count%2 == 0:
    print(*now)
else:
    print(*pre)
            


### FIXED CODE ###

s = input()
a = [0]*len(s)
r, l = 0, 0

for i in range(len(s)):
    r += 1
    if s[i] == 'L':
        a[i-1] += r//2
        a[i] += (r+1)//2
        r = 0
        
for j in range(len(s)-1, -1, -1):
    l += 1
    if s[j] == 'R':
        a[j+1] += l//2
        a[j] += (l+1)//2
        l = 0
    a[j] -= 1

print(*a)
### BUGGY CODE ###

# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

def LI(): return list(map(int, sys.stdin.readline().split()))
N,M = LI()
A = LI()

A.sort()
for i in range(M):
    a_max = A.pop() // 2
    bisect.insort_left(A,a_max)
print(sum(A))


### FIXED CODE ###

# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import heapq

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

def LI(): return list(map(int, sys.stdin.readline().split()))
N,M = LI()
A = LI()

pq = []
for a in A:
    heapq.heappush(pq,-a)

for _ in range(M):
    heapq.heappush(pq,-(-heapq.heappop(pq) // 2))
    # print(pq)

print(-sum(pq))
### BUGGY CODE ###

import numpy as np
N = int(input())
A = list(map(int,input().split()))

counter = 0
AN = set(A)
A = np.array(A)

for i in AN:
    if len(A[A==i]) < i:
        counter += len(A[A == i])
    else:
        counter += (len(A[A == i]) - i)

print(counter)

### FIXED CODE ###

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

NA = set(A)
d = {x:0 for x in NA}

for i in range(N):
    d[A[i]] += 1

counter = 0
for p in d:
    if p > d[p]:
        counter += d[p]
    else:
        counter += d[p]-p

print(counter)
### BUGGY CODE ###

#!/usr/bin/env python
# coding: utf-8

# In[27]:


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


# In[28]:


link = [[] for _ in range(N)]
for _ in range(M):
    L, R, D = map(int, input().split())
    link[L-1].append((R-1, D))
    link[R-1].append((L-1, -D))


# In[24]:


link


# In[25]:


def func():
    x = [0] * N
    houmon = [False] * N

    for start in range(N):
        if houmon[start]:
            continue
        stack = [start]
        while stack:
            n1 = stack.pop(0)
            houmon[n1] = True
            for n2, d in link[n1]:
                if houmon[n2]:
                    if x[n2] != x[n1] + d:
                        return False
                else:
                    x[n2] = x[n1] + d
                    stack.append(n2)
    
    return max(x) - min(x) <= 10 ** 9
    


# In[26]:


if func():
    print('Yes')
else:
    print('No')


# In[ ]:






### FIXED CODE ###

#!/usr/bin/env python
# coding: utf-8

# In[13]:


import sys
from collections import deque
input = sys.stdin.readline


# In[14]:


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


# In[2]:


link = [[] for _ in range(N)]
for _ in range(M):
    L, R, D = map(int, input().split())
    link[L-1].append((R-1, D))
    link[R-1].append((L-1, -D))


# In[9]:


def func():
    houmon = [False] * N
    x = [0] * N
    
    for start in range(N):
        if houmon[start]:
            continue
        stack = deque([start])
        while stack:
            n1 = stack.pop()
            houmon[n1] = True
            for n2, d in link[n1]:
                if houmon[n2]:
                    if x[n2] != x[n1] + d:
                        return False
                else:
                    x[n2] = x[n1] + d
                    stack.append(n2)
        
#         if max(x) - min(x) > 10 ** 9:
#             return False
    
    return True


# In[10]:


if func():
    print('Yes')
else:
    print('No')


# In[ ]:
### BUGGY CODE ###

N, W = map(int, input().split())
wv = [list(map(int, input().split())) for _ in range(N)]

dp = [[0]*(W+1) for _ in range(N+1)]
for i in range(1, N+1):
    for sum_w in range(W+1):
        weight = sum_w - wv[i-1][0]
        if weight < 0:
            dp[i][sum_w] = max([dp[i][sum_w], dp[i-1][sum_w]])
        else:
            dp[i][sum_w] = max([dp[i][sum_w], dp[i-1][sum_w], dp[i-1][weight]+wv[i-1][1]])
print(max(dp[N]))

### FIXED CODE ###

N, W = map(int, input().split())
wv = [list(map(int, input().split())) for _ in range(N)]

dp = [[0]*(W+1) for _ in range(N+1)]
for i in range(1, N+1):
    for sum_w in range(W+1):
        weight = sum_w - wv[i-1][0]
        if weight < 0:
            dp[i][sum_w] = max([dp[i][sum_w], dp[i-1][sum_w]])
        else:
            dp[i][sum_w] = max([dp[i][sum_w], dp[i-1][sum_w], dp[i-1][weight]+wv[i-1][1]])
print(max(dp[N]))
### BUGGY CODE ###

from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

dd = [(1,0),(0,1),(-1,0),(0,-1)]
h,w = inpl()
cy,cx = inpl()
gy,gx = inpl()
cy,cx,gy,gx = cy-1,cx-1,gy-1,gx-1
s = [input() for _ in range(h)]
res = [[INF] * w for _ in range(h)]
res[cy][cx] = 0
seen = set()
seen.add((cy,cx))
q = deque([(cy,cx)])
while q:
    oy,ox = q.popleft()
    for dy,dx in dd:
        ny = oy+dy; nx = ox+dx
        if 0 <= ny < h and 0 <= nx < w and s[ny][nx] == '.' and not (ny,nx) in seen:
            seen.add((ny,nx))
            if res[ny][nx] > res[oy][ox]:
                res[ny][nx] = res[oy][ox]
                q.appendleft((ny,nx))
        for dy in range(-2,3):
            for dx in range(-2,3):
                ny = oy+dy; nx = ox+dx
                if 0 <= ny < h and 0 <= nx < w and s[ny][nx] == '.':
                    if res[ny][nx] > res[oy][ox] + 1:
                        res[ny][nx] = res[oy][ox] + 1
                        q.append((ny,nx))
ans = res[gy][gx]
print(-1 if ans  == INF else ans)

### FIXED CODE ###

from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

dd = [(1,0),(0,1),(-1,0),(0,-1)]
h,w = inpl()
cy,cx = inpl()
gy,gx = inpl()
cy,cx,gy,gx = cy-1,cx-1,gy-1,gx-1
s = [input() for _ in range(h)]
res = [[INF] * w for _ in range(h)]
res[cy][cx] = 0
seen = set()
q = deque([(cy,cx)])
while q:
    oy,ox = q.popleft()
    if (oy,ox) in seen: continue
    seen.add((oy,ox))
    for dy,dx in dd:
        ny = oy+dy; nx = ox+dx
        if 0 <= ny < h and 0 <= nx < w and s[ny][nx] == '.':
            if res[ny][nx] > res[oy][ox]:
                res[ny][nx] = res[oy][ox]
                q.appendleft((ny,nx))
        for dy in range(-2,3):
            for dx in range(-2,3):
                ny = oy+dy; nx = ox+dx
                if 0 <= ny < h and 0 <= nx < w and s[ny][nx] == '.':
                    if res[ny][nx] > res[oy][ox] + 1:
                        res[ny][nx] = res[oy][ox] + 1
                        q.append((ny,nx))
ans = res[gy][gx]
print(-1 if ans  == INF else ans)
### BUGGY CODE ###

n,k,q = map(int,input().split())
ans_list =[]
point = []
for i in range(n):
  point.append(k)
#print(point)
for j in range(q):
  ans_list.append(input().rstrip())
#print(ans_list)
for k in ans_list:
  for l in range(n):
    if l != int(k)-1:
      point[l] -=1
for m in point:
  if m>0:
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

n,k,q = map(int,input().split())
ans_list =[]
point = []
for i in range(n):
  point.append(k)
#print(point)      
for j in range(q):
  ans_list.append(int(input()))
#print(ans_list)
for k in ans_list:
  point[k-1] += 1
#print(point)
for l in range(n):
  point[l] -= q
  if point[l]>0:
    print("Yes")
  else:
    print("No")
#print(point)
### BUGGY CODE ###

N, K = map(int, input().split())
list=list(map(int, input().split()))
m=0
for i in range(N+K-1):
    m=max(m, sum(list[i:i+K]))
    if m == sum(list[i:i+K]):
        n = i
a=list[n:n+K]
su=0
for i in a:
    su+=sum(range(i+1))/i
print(su)

### FIXED CODE ###

N, K = map(int, input().split())
list=list(map(int, input().split()))
a=[]
sum=0
for i in list:
    sum+=((i-1)*(1/2)+1)
    a.append(sum)
ma=a[K-1]
for i in range(N-K):
    ma = max(ma, a[i+K]-a[i])
print(ma)
### BUGGY CODE ###

S = input()
p = 10 ** 9 + 7
DP = [[0 for _ in range(13)] for _ in range(len(S) + 1)]
DP[0][0] = 1
for i, s in enumerate(S[::-1]):
  if s == '?':
    for j in range(10):
      m = j * 10 ** i % 13
      for k in range(13):
        DP[i + 1][(k + m) % 13] += DP[i][k]
  else:
    m = int(s) * 10 ** i % 13
    for k in range(13):
      DP[i + 1][(k + m) % 13] += DP[i][k]
  for k in range(13):
    DP[i + 1][k] %= p
  #print(DP[i])
#print(DP[-1])
print(DP[-1][5])

### FIXED CODE ###

S = input()
p = 10 ** 9 + 7
DP = [[0 for _ in range(13)] for _ in range(len(S) + 1)]
DP[0][0] = 1
M = [[0 for _ in range(13)] for _ in range(6)]
for i in range(6):
  for j in range(10):
    M[i][j] = j * 10 ** i % 13
for i, s in enumerate(S[::-1]):
  if s == '?':
    for j in range(10):
      m = M[i % 6][j]
      for k in range(13):
        DP[i + 1][(k + m) % 13] += DP[i][k]
  else:
    m = M[i % 6][int(s)]
    for k in range(13):
      DP[i + 1][(k + m) % 13] += DP[i][k]
  for k in range(13):
    DP[i + 1][k] %= p
print(DP[-1][5])
### BUGGY CODE ###

i = list(map(int, input().split()))
k = i[0]
s = i[1]
#print("k=",k,"s=",s)
ans = 0
for x in range(k+1):
  for y in range(k+1):
    for z in range(k+1):
#      print("x=",x,"y=",y,"z=",z)
      if x+y+z == s:
#        print("clear!")
        ans += 1
print(ans)

### FIXED CODE ###

i = list(map(int, input().split()))
k = i[0]
s = i[1]
#print("k=",k,"s=",s)
ans = 0
for x in range(k+1):
  for y in range(k+1):
    z = s-x-y
    #print("x=",x,"y=",y,"z=",z)
    if k >= z and z >=0:
        #print("clear!")
        ans += 1
print(ans)
### BUGGY CODE ###

import heapq
n,m = map(int,input().split())
ab = [list(map(int,input().split())) for _ in range(n)]
ab = sorted(ab, key=lambda x:(x[0], x[1])) + [[0,0]]
lst = []
now = 0
ans = 0
heapq.heapify(lst)
for i in range(1,m+1):
  while ab[now][0] == i:
    heapq.heappush(lst,-ab[now][1])
    now += 1
  heapq.heapify(lst)
  if lst:
    ans -= heapq.heappop(lst)
print(ans)

### FIXED CODE ###

import heapq
n,m = map(int,input().split())
ab = [[] for _ in range(m+1)]
for i in range(n):
  a,b = map(int,input().split())
  if a < m+1:
    ab[a].append(b)
lst = []
now = 0
ans = 0
heapq.heapify(lst)
for i in range(1,m+1):
  for j in ab[i]:
    heapq.heappush(lst,-j)
  #heapq.heapify(lst)
  if lst:
    ans -= heapq.heappop(lst)
print(ans)