Harryxun/stf_run huggingface dataset:
n,m=map(int,input().split())
a=[int(i) for i in input().split()]
count=0

A=sum(a)//(4＊m)
for i in range(n):
  if a[i]>A:
    count+=1
if count>=m:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n,m=map(int,input().split())
a=[int(i) for i in input().split()]
count=0
 
A=sum(a)/(4*m)
for i in a:
  if i>=A:
    count+=1
if count>=m:
  print("Yes")
else:
  print("No")
import collections
n = int(input())
a_list = []
for i in range(n):
    a_list.append([int(i) for i in input().split()])
if n = 1:
    print(a_list[0])
else:
    x_range = range(101)
    y_range = range(101)
    for i in x_range:
        for j in y_range:
            h_list = [abs(a[0]-i)+abs(a[1]-j)+a[2] for a in a_list]
            if (len(set(h_list)) == 1) & (h_list[0] > 0):
                print(i, j, h_list[0])
                break

### FIXED CODE ###

n = int(input())
s_list = []
ans = 0
zero_list = []
for _ in range(n):
    x, y, s = map(int, input().split())
    if s > 0:
        s_list.append([x, y, s])
    else:
        zero_list.append([x, y, s])
for x in range(101):
    for y in range(101):
        t = []
        for i in range(len(s_list)):
            x_, y_, h = s_list[i]
            if h > 0:
                t.append(h + abs(x_ - x) + abs(y_ - y))
        if (len(set(t)) == 1):
            if len(zero_list) > 0:
                zero_p = max([list(t)[0] - abs(x - x_zero) - abs(y - y_zero) for (x_zero, y_zero, s_zero) in zero_list])
                if zero_p <= 0:
                    ttt = h + abs(x_ - x) + abs(y_ - y)
                    ans = str(x) + " " + str(y) + " " + str(ttt)
                    break
            else:
                ttt = h + abs(x_ - x) + abs(y_ - y)
                ans = str(x) + " " + str(y) + " " + str(ttt)
                break
                
print(ans)
import copy
N = int(input())

l = list(range(1,N+1)) ## 1~Nのリスト
I = compy.deepcopy(l)

a = l.pop(0)
l.append(a)

print(sum([x % y for (x,y) in zip(I, l)]))




### FIXED CODE ###

N  =int(input())
print(N*(N-1)//2)
S=list(int(i) for i in input().split())
for x in range(len(S)+1):
  if S[x]==S[x+1]:
    print('Bad')
  else:
    print('Good')


### FIXED CODE ###

S=list(int(i) for i in input())
for i in range(len(S)-1):
  if S[i]==S[i+1]:
    print('Bad')
    break
else:
  print('Good')
# -*- coding: utf-8 -*-
import bisect

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

P = []
Y = []
PY = []
dic = {}
for i in range(M):
    p,y = map(int,input().split())
    P.append(p)
    Y.append(y)

    dic[y] = ''

    PY.append((p,y))

PY = sorted(PY)
P  = sorted(P)
lenP = len(P)
left = 0
righ = 0
for i in range(1,N+1):

    t_list = []

    left = bisect.bisect_left(P,i,righ,lenP)
    righ = bisect.bisect_right(P,i,left,lenP)

    # print(i,P)
    # print(left,righ)

    if i == P[left]:
        for j in range(left,righ):
            t_list.append(PY[j][1])
        t_list = sorted(t_list)
        for k in range(len(t_list)):
            y = t_list[k]
            dic[y] = str(i).zfill(6) + str(k+1).zfill(6)

for y in Y:
    print(dic[y])


### FIXED CODE ###

import bisect

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

P = []
Y = []
PY = []
dic = {}
for i in range(M):
    p,y = map(int,input().split())
    P.append(p)
    Y.append(y)

    dic[y] = ''

    PY.append((p,y))

PY = sorted(PY)
P  = sorted(P)
lenP = len(P)
left = 0
righ = 0
for i in range(1,N+1):

    t_list = []

    left = bisect.bisect_left(P,i,0,lenP)
    righ = bisect.bisect_right(P,i,0,lenP)

    # print(i,P)
    # print(left,righ)

    if i == P[left]:
        for j in range(left,righ):
            t_list.append(PY[j][1])
        t_list = sorted(t_list)
        for k in range(len(t_list)):
            y = t_list[k]
            dic[y] = str(i).zfill(6) + str(k+1).zfill(6)

    if lenP == righ:
        # print('break')
        break

for y in Y:
    print(dic[y])
n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
x=[0]*n
y=[0]*m
x[0]=a[0]
y[0]=b[0]
for i in range(0,n-1):
    x[i+1]=x[i]+a[i+1]
for i in range(0,m-1):
    y[i+1]=y[i]+b[i+1]
ans,j=0,m-1
for i in range(n):
    if x[i]>k:
        break
    while y[j]>k-x[i]:
        j-=1
    ans=max(i+2+j,ans)
print(ans)

### FIXED CODE ###

n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
x,y=[0],[0]
for i in range(n):
    x.append(a[i]+x[i])
for j in range(m):
    y.append(b[j]+y[j])

ans=0
j=m
for i in range(n+1):
    if x[i]>k:
        break
    while y[j]>k-x[i]:
        j-=1
    ans=max(i+j,ans)
print(ans)
while 1:
    x, y = map(int, raw_input().split())
    if x == 0 and y == 0:
      break
    if y < x:
      print '%s %s' %(y, x)
    else:
      print '%s %s' %(x, y)
    

### FIXED CODE ###

while 1:
   x, y = map(int, raw_input().split())
   if x == 0 and y == 0:
      break
   elif x > y:
      print '%s %s' % (y,x)
   else:
      print '%s %s' % (x,y)
def d_lamp(H, W, Grid):
    num_left = [[0] * W for _ in range(H)]
    num_right = [[0] * W for _ in range(H)]
    num_down = [[0] * W for _ in range(H)]
    num_up = [[0] * W for _ in range(H)]

    for row in range(H):
        for col in range(W):
            if Grid[row][col] == '.':
                num_left[row][col] = 1 if col == 0 else (num_left[row][col - 1] + 1)

    for row in range(H):
        for col in range(W - 1, -1, -1):
            if Grid[row][col] == '.':
                num_right[row][col] = 1 if col == W - 1 else (num_right[row][col + 1] + 1)

    for col in range(W):
        for row in range(H):
            if Grid[row][col] == '.':
                num_up[row][col] = 1 if row == 0 else (num_up[row - 1][col] + 1)

    for col in range(W):
        for row in range(H - 1, -1, -1):
            if Grid[row][col] == '.':
                num_down[row][col] = 1 if row == H - 1 else (num_down[row + 1][col] + 1)

    ans = max(num_left[row][col] + num_right[row][col] + num_up[row][col]
              + num_down[row][col] - 3 for row in range(H) for col in range(W))
    return ans

H, W = [int(i) for i in input().split()]
Grid = [input() for _ in range(H)]
print(d_lamp(H, W, Grid))

### FIXED CODE ###

def f_takahashi_basics_in_education_and_learning(L, A, B, M, DIGIT_MAX=18):
    """numpyの行列演算だと L, A, B が 10**18 程度のときうまく動作しない"""
    def identity_matrix(n):
        """n×n単位行列"""
        return [[int(i == j) for i in range(n)] for j in range(n)]

    def multiply(a, b):
        """行列a, bの積"""
        row = len(a)
        col = len(b[0])
        t = len(b)
        ret = [[0] * col for _ in range(row)]
        for i in range(row):
            for j in range(col):
                for k in range(t):
                    ret[i][j] += a[i][k] * b[k][j]
        for i in range(row):
            for j in range(col):
                ret[i][j] %= M
        return ret

    def power(a, k):
        """行列aのk乗"""
        n = len(a)
        ret = identity_matrix(n)
        while k:
            if k & 1:
                ret = multiply(ret, a)
            a = multiply(a, a)
            k >>= 1
        return ret
 
    # 数列に対して、d桁の要素の個数を求める
    num_pow_d = [0] * (DIGIT_MAX + 1)
    for d in range(DIGIT_MAX + 1):
        if 10**d - 1 < A:
            continue
        # dに対してA + B*n <= 10**d - 1 となる最大のn(L以下しか取りえない)
        num_pow_d[d] = min(((10**d - 1 - A) // B) + 1, L)  # +1はnが0スタートのため
    ans = 0
    array = [[0, A, 1]]
    for d in range(1, DIGIT_MAX + 1):
        c_d = num_pow_d[d] - num_pow_d[d - 1]
        matrix = [[10**d, 0, 0], [1, 1, 0], [0, B, 1]]
        array = multiply(array, power(matrix, c_d))
    return array[0][0]

L, A, B, M = [int(i) for i in input().split()]
print(f_takahashi_basics_in_education_and_learning(L, A, B, M))
N, A, B = map(int, input().split())

dif = B-A
if dif%2 == 0:
  print(int(dif/2))
else:
  print(min(A-1, N-B)+1+int((dif//2))


### FIXED CODE ###

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

dif = B-A
if dif%2 == 0:
  print(dif//2)
else:
  print(min(A-1, N-B)+1+dif//2)
N, T = map(int,input().split())
ans = float("inf")

for i in range(0,N):
    c,t = map(int,input(),split())
    if t <= T:
        ans = min(num,c)

if ans == float("inf"):
    print("TLE")
else:
    print(ans)


### FIXED CODE ###

N = int(input())
if N == 1:
    print("Hello World")
elif N == 2:
    A = int(input())
    B = int(input())
    print(A + B)
N, M = map(int, input().split())
WAC = [0 for i in range(M)]
TF = {}
for i in range(M):
    p, S = input().split()
    p = int(p)
    if p in TF.keys():
        if S == 'AC':
            TF[p] = True
    else:
        if S == 'AC':
            TF[p] = True
        else:
            TF[p] = False
    if  TF[p] == False and S == 'WA':
        WAC[p-1] += 1
count = 0
for k in TF:
    if TF[k]:
        count += 1
print(count, sum(WAC))



### FIXED CODE ###

N, M = map(int, input().split())
WAC = [0 for i in range(N)]
TF = [0 for i in range(N)]
for i in range(M):
    p, S = input().split()
    p = int(p)-1
    if S == 'AC':
        TF[p] = 1
    if TF[p] == 0 and S == 'WA':
        WAC[p] += 1
count = 0
for i in range(N):
    count += TF[i] * WAC[i]
print(sum(TF), count)
N = int(input())
h = [int(i) for i in input().split()] 

# 足場iにたどり着く最小コストをc[i]とすると、
# c[i] = min(c[i-1] + |h[i] - h[i-1]| , c[i-2] + |h[i] - h[i-2]|) 

def cost(i):
    if i > 1:
        return min(cost(i-1) + abs(h[i] - h[i-1]) , cost(i-2) + abs(h[i] - h[i-2]))
    if i == 1:
        return cost(i-1) + abs(h[i] - h[i-1])
    if i == 0:
        return 0

print(cost(N-1))

### FIXED CODE ###


N = int(input())
h = [int(i) for i in input().split()] 

# 足場iにたどり着く最小コストをc[i]とすると、
# c[i] = min(c[i-1] + |h[i] - h[i-1]| , c[i-2] + |h[i] - h[i-2]|) 

cost = [0] * N 
for i in range(N):
    if i==0:
        cost[i] = 0
    if i==1:
        cost[i] = abs(h[i] - h[i-1])
    if i > 1:
        cost[i] = min(cost[i-1] + abs(h[i] - h[i-1]) , cost[i-2] + abs(h[i] - h[i-2]))

print(cost[N-1])
A, B, C = (int(i) for i in input().split()) 
if (A < C and C < B) or (B < C and C < A):
  print("Yes")
else:
print("No")

### FIXED CODE ###

A, B, C = (int(i) for i in input().split()) 
if (A < C and C < B) or (B < C and C < A):
   print("Yes")
else:
   print("No")
# D - Good Grid

from collections import defaultdict
import itertools

N, C = map(int, input().split())
D = [[0] * C for _ in range(C)]
for i in range(C):
    D[i] = list(int(d) for d in input().split())

# MOD3の世界で0,1,2ごとに、最初の値の数をカウントしておく
dict_c = [defaultdict(int) for _ in range(3)]
for i in range(N):
    c = list(int(x) for x in input().split())
    for j in range(N):
        dict_c[(i+j)%3][c[j]-1] += 1
#print(D)
#print(dict_c)

# ここからは全探索。
# 0, 1, 2の各配列に対して、全ての色を試す(C**3)
list_C = list(range(C))
ans = 10**18
for (p, q, r) in itertools.permutations(list_C):
    tmp = 0
    for i, j in enumerate((p, q, r)):
        #print(p, q, r)
        for i, k in dict_c[i].items():
            #print(i, j, k)
            #print(D[i][j])
            tmp += D[i][j] * k
    #print(tmp)
    ans = min(ans, tmp)

print(ans)

### FIXED CODE ###

# D - Good Grid

from collections import defaultdict
import itertools

N, C = map(int, input().split())
D = [[0] * C for _ in range(C)]
for i in range(C):
    D[i] = list(int(d) for d in input().split())

# MOD3の世界で0,1,2ごとに、最初の値の数をカウントしておく
dict_c = [defaultdict(int) for _ in range(3)]
for i in range(N):
    c = list(int(x) for x in input().split())
    for j in range(N):
        dict_c[(i+j)%3][c[j]-1] += 1

# ここからは全探索。
# 0, 1, 2の各配列に対して、全ての色を試す(C**3)
list_C = list(range(C))
ans = 10**18
for (p, q, r) in itertools.permutations(list_C, 3):
    tmp = 0
    for i, j in enumerate((p, q, r)):
        for m, n in dict_c[i].items():
            tmp += D[m][j] * n
    ans = min(ans, tmp)

print(ans)
a = int(input())
b = int(input())
menseki = a*b
nagasa = (a+b)*2
print mensaki.nagasa.split()

### FIXED CODE ###

a,b=[int(i) for i in input().split()]
print(a*b,(a+b)*2)
class UnionFind:
    def __init__(self, n: int) -> None:
        #マイナスならルートでその深さを表す。プラスならルートのノードを指す。
        self.nodes = [-1]*n
 
    def find_root(self, x: int) -> int:
        if self.nodes[x] < 0:
            return x
        else:
            self.nodes[x] = self.find_root(self.nodes[x])
            return self.nodes[x]
 
    def unite(self, x: int, y: int) -> None:
        x, y = self.find_root(x), self.find_root(y)
        #浅い方につなぐ
        if (x != y):
            if (x < y):
                self.nodes[y] += self.nodes[x]
                self.nodes[x] = y
            else:
                self.nodes[x] += self.nodes[y]
                self.nodes[y] = x
        
    def is_same(self, x: int, y: int) -> bool:
        return self.find_root(x) == self.find_root(y)

from operator import itemgetter

N = int(input())
G = [[i] + list(map(int, input().split())) for i in range(N)]

#X,Yそれぞれでソートして各都市の最短距離を求める
G_sorted_by_x = sorted(G, key=itemgetter(1))
G_sorted_by_y = sorted(G, key=itemgetter(2))
R = []
for i in range(N-1):
    i0, x0, _ = G_sorted_by_x[i]
    i1, x1, _ = G_sorted_by_x[i+1]
    R.append((x1-x0, i0, i1))
    i0, _, y0 = G_sorted_by_y[i]
    i1, _, y1 = G_sorted_by_y[i+1]
    R.append((y1-y0, i0, i1))

R_sorted_by_cost = sorted(R, key=itemgetter(0))

#print(R_sorted_by_cost)

uf = UnionFind(N)
total_cost = 0
for cost, i, j in R_sorted_by_cost:
    if (not uf.is_same(i-1, j-1)):
        uf.unite(i-1, j-1)
        total_cost += cost
    #print((cost, i, j))
print(total_cost)


### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

class UnionFind:
    def __init__(self, n: int) -> None:
        #マイナスならルートでその深さを表す。プラスならルートのノードを指す。
        self.nodes = [-1]*n
 
    def find_root(self, x: int) -> int:
        if self.nodes[x] < 0:
            return x
        else:
            self.nodes[x] = self.find_root(self.nodes[x])
            return self.nodes[x]
 
    def unite(self, x: int, y: int) -> None:
        x, y = self.find_root(x), self.find_root(y)
        #浅い方につなぐ
        if (x != y):
            if (x < y):
                self.nodes[y] += self.nodes[x]
                self.nodes[x] = y
            else:
                self.nodes[x] += self.nodes[y]
                self.nodes[y] = x
        
    def is_same(self, x: int, y: int) -> bool:
        return self.find_root(x) == self.find_root(y)

from operator import itemgetter

N = int(input())
G = [[i] + list(map(int, input().split())) for i in range(N)]

#X,Yそれぞれでソートして各都市の最短距離を求める
G_sorted_by_x = sorted(G, key=itemgetter(1))
G_sorted_by_y = sorted(G, key=itemgetter(2))
R = []
for i in range(N-1):
    i0, x0, _ = G_sorted_by_x[i]
    i1, x1, _ = G_sorted_by_x[i+1]
    R.append((x1-x0, i0, i1))
    i0, _, y0 = G_sorted_by_y[i]
    i1, _, y1 = G_sorted_by_y[i+1]
    R.append((y1-y0, i0, i1))

R_sorted_by_cost = sorted(R, key=itemgetter(0))

#print(R_sorted_by_cost)

uf = UnionFind(N)
total_cost = 0
for cost, i, j in R_sorted_by_cost:
    if (not uf.is_same(i, j)):
        uf.unite(i, j)
        total_cost += cost
    #print((cost, i, j))
print(total_cost)
n,k=map(int,print().split())
if n%k==0:
  print(0)
else:
  print(1)
    
    

### FIXED CODE ###

n,k=map(int,input().split())
if n%k==0:
  print(0)
else:
  print(1)
S,T=input().split()
print(*[s+t for s,t in zip(S,T)],sep='')

### FIXED CODE ###

N=input()
S,T=input().split()
print(*[s+t for s,t in zip(S,T)],sep='')
inf = float("inf")
N = int(input())
A = []
for _ in range(N):
    a = [int(s) for s in input().split()]
    A.append(a)
d = [a[:] for a in A]
ans = 0
for i in range(N - 1):
    for j in range(i + 1, N):
        dmin = min([d[i][k] + d[k][j] for k in range(N) if k not in (i, j)])
        if d[i][j] > dmin:
            print(-1)
            exit()
        if d[i][j] != dmin:
            ans += d[i][j]
print(ans)


### FIXED CODE ###

inf = float("inf")
N = int(input())
A = []
for _ in range(N):
    a = [int(s) for s in input().split()]
    A.append(a)
d = [a[:] for a in A]
ans = 0
for i in range(N - 1):
    for j in range(i + 1, N):
        dmin = min([inf] + [d[i][k] + d[k][j]
                            for k in range(N) if k not in (i, j)])
        if d[i][j] > dmin:
            print(-1)
            exit()
        if d[i][j] != dmin:
            ans += d[i][j]
print(ans)
n = input()
l = list(map(int, input().split()))

lm = 0
for i in range(0, n):
  if lm < l[i]:
    lm = l[i]

ls = -1 * lm
for i in range(0, n):
  ls = ls + l[i]

if lm < ls:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

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

n = len(l)

lm = 0
ls = 0
for i in range(0, n):
  if lm < l[i]:
    lm = l[i]
  ls = ls + l[i]
ls = ls - lm

if lm < ls:
  print("Yes")
else:
  print("No")
s = input()
t = input()
ans=0
for i in range(0,len(s)):
    a=s[i:]
    b=s[:i]
    ss=a+b
    print(ss)
    if ss == t:
        ans = 1
if ans == 1:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

li = list(map(int,input().split()))
li.sort()
#li
print(li[2]-li[1]+li[1]-li[0])
AC_Count = WA_Count = TLE_Count = RE_Count = 0
for _ in range(int(input())):
	s = input()
	if s=="AC":
		AC_Count+=1
	elif s=="WA":
		WA_Count+=1
	elif s=="TLE":
		TLE_Count+=1
	else:
		RE_Count+=1
print("AC "+"x "+AC_count)
print("WA "+"x "+WA_count)
print("TLE "+"x "+TLE_count)
print("RE "+"x "+RE_count)

### FIXED CODE ###

a = 0
w = 0
r = 0
t = 0
for _ in range(int(input())):
	s = input()
	if s=="AC":
		a+=1
	elif s=="WA":
		w+=1
	elif s=="TLE":
		t+=1
	else:
		r+=1
print("AC "+"x "+str(a))
print("WA "+"x "+str(w))
print("TLE "+"x "+str(t))
print("RE "+"x "+str(r))
n,m=map(int,input().split())

d={}

for i in range(n):
    A,B=map(int,input().split())

    d[A]=B

l = sorted(list(d.items()),key=lambda x: x[0])

total=0
cnt=0
for i in range(n):
    total+=l[i][0]*l[i][1]

    cnt+=l[i][1]

    if cnt>m:
        total -= l[i][0]*(cnt-m)
        print(total)
        exit(0) 

print(total)


### FIXED CODE ###

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

d={}

for i in range(n):
    A,B=map(int,input().split())

    if A in d:
        d[A]+=B
    else:
        d[A]=B

l = sorted(list(d.items()),key=lambda x: x[0])

total=0
cnt=0

for i in range(len(l)):
    total+=l[i][0]*l[i][1]

    cnt+=l[i][1]

    if cnt>m:
        total -= l[i][0]*(cnt-m)
        print(total)
        exit(0) 

print(total)
n = int(input())
s = input()
cnt = 0
flag = 0
for i in range(n):
  if s[i] == "A":
    flag = 1
  elif s[i] == "B" and flag == 1:
    flag = 2
  elif s[i] == "C" and flag == 2:
    cnt += 1
    flag = 0
  else:
    flag = 0
print(cnt)

### FIXED CODE ###

k,x = map(int,input().split())
if k*500 >= x:
  print("Yes")
else:
  print("No")
# AtCoder Regular Contest 080
# C - 4-adjacent

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

oddcount=0
mod40=0
other=0

for a in alist:
    if a%2==1:
        oddcount+=1
    elif a%4==0:
        mod40+=1
    else:
        other+=1

if N==1:
    if mod40==N:
        print("Yes")
        exit()
    else:
        print("No")
        exit()
if N==2 or N==3:
    if mod40>0 or other==N:
        print("Yes")
        exit()
    else:
        print("No")
        exit()
# ↑ここまではあってそう。

if N%2==1:
    if (N-((other//2)*2))//2 <= mod40:
        print("Yes")
        exit()
    else:
        print("No")
        exit()

else:
    print(np.array)


    # if (N-other)//2 < mod40:
    #     print("Yes")
    # else:
    #     print("No")


### FIXED CODE ###

# AtCoder Regular Contest 080
# C - 4-adjacent

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

oddcount=0
mod40=0
other=0

for a in alist:
    if a%2==1:
        oddcount+=1
    elif a%4==0:
        mod40+=1
    else:
        other+=1

if N==1:
    if mod40==N:
        print("Yes")
        exit()
    else:
        print("No")
        exit()
if N==2 or N==3:
    if mod40>0 or other==N:
        print("Yes")
        exit()
    else:
        print("No")
        exit()
# ↑ここまではあってそう。

if N%2==1:  # N>3 ,Nが奇数の時
    if (N-((other//2)*2))//2 <= mod40:
        print("Yes")
        exit()
    else:
        print("No")
        exit()

else:   # N>3 ,Nが偶数の時
    if other%2==1:  #かつ、要素が偶数である数が奇数の時  
        if (N-((other//2)*2))//2 <= mod40:
            print("Yes")
            exit()
        else:
            print("No")
            exit()
    else:
        if (N-((other//2)*2))//2 <= mod40:
            print("Yes")
            exit()
        else:
            print("No")
            exit()
n=int(input())
l=[0]*5
m='MARCH'
for i in range(n):
  s=input()
  f=s[0]
  for i in range(5):
    if f==m[i]:
      l[i]+=1
      break
x=0
for i in range(3):
  for j in range(i+1,4):
    for k in range(j+1,5):
      x+=a[i]*a[j]*a[k]
print(x)

### FIXED CODE ###

n=int(input())
l=[0]*5
m='MARCH'
for i in range(n):
  s=input()
  f=s[0]
  for i in range(5):
    if f==m[i]:
      l[i]+=1
      break
a=[]
for i in l:
  if i!=0:
    a.append(i)
if len(a)<3:
  print(0)
elif len(a)==3:
  print(a[0]*a[1]*a[2])
elif len(a)==4:
  print(a[0]*a[1]*(a[2]+a[3])+a[2]*a[3]*(a[0]+a[1]))
else:
  x=0
  for i in range(3):
    for j in range(i+1,4):
      for k in range(j+1,5):
        x+=a[i]*a[j]*a[k]
  print(x)
#!/usr/bin/env python3

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

dic = {}

for a in A:
    if a in dic:
        dic[a] += 1
    else:
        dic[a] = 1

ans = True

if len(dic) > 3:
    ans = False

elif len(dic) == 3:
    for k in dic:
        if dic[k] != N // 3:
            ans = False
            break

elif len(dic) == 2:
    keys = dic.keys()
    if 0 not in keys:
        ans = False
    if dic[keys[0]] != dic[keys[1]]:
        ans = False

else:
    key = dic.keys()
    if 0 not in keys:
        ans = False

if ans:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

#!/usr/bin/env python3

#import
#import math
#import numpy as np
N = int(input())
A = list(map(int, input().split()))
n = N // 3
dic = {}

for a in A:
    if a in dic:
        dic[a] += 1
    else:
        dic[a] = 1

ans = True

if len(dic) > 3:
    ans = False

elif len(dic) == 3:
    keys = dic.keys()
    t = []
    for k in keys:
        t.append(k)
        if dic[k] != n:
            ans = False

    a = t[0]
    b = t[1]
    c = t[2]

    if (a ^ b) != c:
        ans = False

elif len(dic) == 2:
    for k in dic:
        if k == 0:
            if dic[k] != n:
                ans = False
        else:
            if dic[k] != n * 2:
                ans = False

else:
    keys = dic.keys()
    if not 0 in keys:
        ans = False

if ans:
    print("Yes")
else:
    print("No")