Harryxun/stf_run huggingface dataset:
n = int(input())
a = [int(i) for i in input().split()]
col = [0 for i in range(n)]
cnt = 0
for i in range(n):
    if 1 <= a[i] <=399:
        col[i] = "b"
    elif 400<= a[i]<=799:
        col[i] = "c"
    elif 800<= a[i]<=1199:
        col[i] = "d"
    elif 1200<= a[i]<=1599:
        col[i] = "e"
    elif 1600<= a[i]<=1999:
        col[i] = "f"
    elif 2000<= a[i]<=2399:
        col[i] = "g"
    elif 2400<= a[i]<=2799:
        col[i] = "h"
    elif 2800<= a[i]<=3199:
        col[i] = "j"
    else:
        col[i] = "k"
        cnt += 1
colv = list(set(col))
mn =mx = len(colv)
if "k" in colv:
        mn -=1
        mx += cnt-1
        if mn == 0:
            mn =1
        
print(str(mn)+" "+str(mx))

### FIXED CODE ###

rgb = input().split()
ans = "".join(rgb)
ans = int(ans)
if ans%4 == 0:
    print('YES')
else:
    print('NO')
n,r=int(input())
if n>9:
  print(r)
else:
  print(r+100*(10-n))

### FIXED CODE ###

n,r=map(int,input().split())
if n>9:
  print(r)
else:
  print(r+100*(10-n))
n,m,k=map(int,input().split())

F=[set() for i in range(n)]
B=[set() for i in range(n)]
for i in range(m):
	a,b=map(int,input().split())
	F[a-1].add(b-1)
	F[b-1].add(a-1)
for i in range(k):
	c,d=map(int,input().split())
	B[c-1].add(d-1)
	B[d-1].add(c-1)
	
T=[[] for i in range(n)]
D=[0]*n
for i in range(n):
	if D[i]==1:
	    continue
	que=deque([])
	que.append(i)
	T[i].append(i)
	while que:
	    p=que.popleft()
	    for np in F[p]:
	        if D[np]!=1:
	            que.append(np)
	            T[i].append(np)
	            D[np]=1

S=[[] for i in range(n)]
for i in range(n):
    if T[i]:
        for t in T[i]:
            S[t]=set(T[i][:])
            S[t].remove(t)
		
R=[0]*n
for i in range(n):
	R[i]=len(S[i])-len(F[i])-len(set(S[i])&set(B[i]))
print(*R)

### FIXED CODE ###

from collections import deque
n,m,k=map(int,input().split())

F=[set() for i in range(n)]
B=[set() for i in range(n)]
for i in range(m):
	a,b=map(int,input().split())
	a,b=a-1,b-1
	F[a].add(b)
	F[b].add(a)
for i in range(k):
	c,d=map(int,input().split())
	c,d=c-1,d-1
	B[c].add(d)
	B[d].add(c)
	
T=[set() for i in range(n)]
D=[0]*n
R=[0]*n

for i in range(n):
    if D[i]:
        continue
    que=deque([])
    que.append(i)
    S=set()
    S.add(i)
    while que:
        p=que.popleft()
        for np in F[p]:
            if D[np]!=1:
                que.append(np)
                S.add(np)
                D[np]=1
    for s in S:
        R[s]=len(S)-len(F[s])-len(S&B[s])-1

print(*R)
s=input().split()
print(s[0]+" "+s[1]+" "+s[2]+" ")

### FIXED CODE ###

s=input().split(",")
print(s[0]+" "+s[1]+" "+s[2])
from collections import Counter

N = int(input())
alpha = [chr(i) for i in range(97, 97+26)]

temp = []
for n in range(N):
  result = []
	for i in temp:
    	temp_list = list(i)
  		type = len(Counter(temp_list))
  
  			for j in range(type):
    			result.append(i + alpha[j])
	temp = result.copy()
    
print('\n'.join(result))

### FIXED CODE ###

from collections import Counter

N = int(input())
alpha = [chr(i) for i in range(97, 97+26)]
temp = ['a']
result = ['a']
if N >= 2:
  for n in range(2,N+1):
    result = []
    for i in temp:
      temp_list = list(i)
      type = len(Counter(temp_list))
      for j in range(type+1):
        a = i + alpha[j]
        result.append(a)
    temp = result.copy()
print('\n'.join(result))
a.b=int(i) for i in input().split()]
print(a*b.a+a+b+b)

### FIXED CODE ###

a,b = [int(i) for i in input().split()]
print(a*b,a+a+b+b)
large_p = 10**9 + 7
a = []
kazu_memo = {}
def f(target_step):
    global kazu_memo
    #print(target_step)
    if target_step in a:
        return 0
    elif target_step < 0:
        return 0
    elif target_step == 0:
        return 1
    else:
        if kazu_memo[target_step] > 0:
            return kazu_memo[target_step]
        else:
            kazu_tmp = 0
            kazu_tmp += f(target_step - 1)
            kazu_tmp += f(target_step - 2)
            kazu_memo[target_step] = kazu_tmp % large_p
            return kazu_tmp % large_p

def main():
    global a, kazu_memo
    n, m = map(int, input().split())
    a = [int(input()) for _ in range(m)]

    kazu_memo = {e: -1 for e in range(1, n + 1)}
    r = f(n)
    print(r % large_p)


if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
large_p = 10**9 + 7
a = []
kazu_memo = {}
kazu_tmp = 0
def f(target_step):
    global kazu_memo, kazu_tmp
    #print(target_step)
    if target_step < 0:
        return 0
    else:
        if kazu_memo[target_step] >= 0:
            return kazu_memo[target_step]
        else:
            kazu_tmp = (f(target_step - 1) + f(target_step - 2)) % large_p
            kazu_memo[target_step] = kazu_tmp
            return kazu_tmp

def main():
    global a, kazu_memo
    n, m = map(int, input().split())
    kazu_memo = {e: -1 for e in range(0, n + 1)}
    kazu_memo[0] = 1
    for _ in range(m):
        ta = int(input())
        kazu_memo[ta] = 0

    r = f(n)
    print(r % large_p)


if __name__ == '__main__':
    main()
D, G = map(int, input().split())
PC = [list(map(int,input().split())) for i in range(D)]

l = []
for i in range(2 ** D):
  t = 0
  c = 0
  for j in range(D):
    if ((i >> j) & 1):
      t += (j+1)*100*PC[j][0]+PC[j][1]
      c += PC[j][0]
  if t >= G:
    l.append(c)
  else:
    ck = []
    for j in range(D):
      if ((i >> j) & 0):
        ck.append(j)
    for k in range(PC[j][0]):
      t += (max(ck)+1)*100
      c += 1
      if t >= G:
        l.append(c)
      
print(min(l))


### FIXED CODE ###

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

l = []
for i in range(2 ** D):
  t = 0
  c = 0
  for j in range(D):
    if ((i >> j) & 1):
      t += (j+1)*100*PC[j][0]+PC[j][1]
      c += PC[j][0]
  if t >= G:
    l.append(c)
  else:
    ck = []
    for j in range(D):
      if ((i >> j) & 1):
        continue
      else:
        ck.append(j)
    if ck == []:
      continue
    ckm = max(ck)
    for k in range(PC[ckm][0]):
      t += (ckm+1)*100
      c += 1
      if t >= G:
        l.append(c)
        break
      
print(min(l))
n=input()
i=int(n)
m=sum(list(n))
print('Yes' if i%m==0 else 'No')

### FIXED CODE ###

n=input()
i=int(n)
m=sum(list(map(int,list(n))))
print('Yes' if i%m==0 else 'No')
N = int(input())
list = [0]*1001
for i in range(1,1001):  
    for j in range(1,1001):
        a = i*i + j*j + i*j
        for k in range(1,1001):
            a = i*i + j*j + k*k + i*j +j*k + i*k
            if a <= N:
                list[a] += 1
for i in range(1,N+1):
    print(list[i])

### FIXED CODE ###

N = int(input())
list = [0]*(N+1)
for i in range(1,100):  
    for j in range(1,100):
        a = i*i + j*j + i*j
        for k in range(1,100):
            a = i*i + j*j + k*k + i*j +j*k + i*k
            if a <= N:
                list[a] += 1
for i in range(1,N+1):
    print(list[i])
# -*- coding:utf-8 -*-
def main2():
    def gcd(*numbers):
        return reduce(math.gcd, numbers)

    import math
    from functools import reduce
    N, X = list(map(int, input().split()))
    xs = list(map(int, input().split()))

    if len(xs) == 1:
        print(abs(xs[0] - X))
        exit()

    diffs = []
    for x in xs:
        diffs.append(abs(x-X))
    print(gcd(*diffs))

if __name__ == "__main__":
    main2()


### FIXED CODE ###

def main4():
    import fractions
    N, X = list(map(int, input().split()))
    xs = list(map(int, input().split()))

    diffs = []
    for x in xs:
        diffs.append(abs(X-x))

    if len(diffs) == 1:
        print(diffs[0])
        exit()

    ans = 10**9+1
    for i in range(len(diffs)-1):
        ans = min(fractions.gcd(diffs[i], diffs[i+1]), ans)
    print(ans)

if __name__ == "__main__":
    main4()
import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

class SegmentTree(object):
	#N:処理する区間の長さ
	def __init__(self, N):
		self.N = N
		self.N0 = 2 ** (N - 1).bit_length()
		self.initVal = 0
		self.data = [self.initVal] * (2 * self.N0)

	# 区間クエリの種類
	def calc(self, a, b):
		return a + b

	# k番目の値にxを加算
	def add(self, k, x):
		k += self.N0 - 1
		self.data[k] += x
		while k > 0:
			k = (k - 1) // 2
			self.data[k] = self.calc(self.data[2 * k + 1], self.data[2 * k + 2])

	#区間[l, r]の演算値
	def query(self, l, r):
		L = l + self.N0; R = r + self.N0 + 1
		m = self.initVal
		while L < R:
			if R & 1:
				R -= 1
				m = self.calc(m, self.data[R - 1])
			if L & 1:
				m = self.calc(m, self.data[L - 1])
				L += 1
			L >>= 1; R >>= 1

		return m

#処理内容
def main():
	N, K = getlist()
	A = []
	for i in range(N):
		a = int(input())
		A.append(a)

	# K引く
	for i in range(N):
		A[i] -= K
	
	# 累積和
	B = [0]
	for i in range(N):
		B.append(B[-1] + A[i])

	# 座圧
	C = list(set(B))
	C.sort()
	D = defaultdict(int)
	for i in range(len(C)):
		D[C[i]] = i

	# 座標変換
	for i in range(N + 1):
		B[i] = D[B[i]]

	# セグ木
	ans = 0
	Seg = SegmentTree(N)
	for i in range(N + 1):
		b = B[i]
		val = Seg.query(0, b)
		ans += val
		Seg.add(b, 1)

	print(ans)


if __name__ == '__main__':
	main()

### FIXED CODE ###

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

class SegmentTree(object):
	#N:処理する区間の長さ
	def __init__(self, N):
		self.N = N
		self.N0 = 2 ** (N - 1).bit_length()
		self.initVal = 0
		self.data = [self.initVal] * (2 * self.N0)

	# 区間クエリの種類
	def calc(self, a, b):
		return a + b

	# k番目の値にxを加算
	def add(self, k, x):
		k += self.N0 - 1
		self.data[k] += x
		while k > 0:
			k = (k - 1) // 2
			self.data[k] = self.calc(self.data[2 * k + 1], self.data[2 * k + 2])

	#区間[l, r]の演算値
	def query(self, l, r):
		L = l + self.N0; R = r + self.N0 + 1
		m = self.initVal
		while L < R:
			if R & 1:
				R -= 1
				m = self.calc(m, self.data[R - 1])
			if L & 1:
				m = self.calc(m, self.data[L - 1])
				L += 1
			L >>= 1; R >>= 1

		return m

#処理内容
def main():
	N, K = getlist()
	A = []
	for i in range(N):
		a = int(input())
		A.append(a)

	# K引く
	for i in range(N):
		A[i] -= K
	
	# 累積和
	B = [0]
	for i in range(N):
		B.append(B[-1] + A[i])

	# 座圧
	C = list(set(B))
	C.sort()
	D = defaultdict(int)
	for i in range(len(C)):
		D[C[i]] = i

	# 座標変換
	for i in range(N + 1):
		B[i] = D[B[i]]

	# セグ木
	ans = 0
	Seg = SegmentTree(N + 1)
	for i in range(N + 1):
		b = B[i]
		val = Seg.query(0, b)
		ans += val
		Seg.add(b, 1)

	print(ans)


if __name__ == '__main__':
	main()
a=int(input())
b=int(input())
if a<=8:
    if b<=8:
        print('Yay!')
    else:
        print(': (')
else:
    print(': (')


### FIXED CODE ###

a,b=map(int,input().split())
if a<=8 and b<=8:
    print('Yay!')
else:
    print(':(' )
from decimal import *
import numpy as np
n=input()
ans=list(map(Decimal,input().split()))
ans = np.prod(ans)

if ans>10**18:
  print(-1)
else:
  print(int(ans))

### FIXED CODE ###

n=input()
A=list(map(int,input().split()))
ans=1
if A.count(0)==0:
  for i in A:
    ans*=i
    if ans>10**18:
      ans=-1
      break
else:
  ans=0
print(ans)
MOD = 10**9 + 7

def prod(a):
    res = 1
    for x in a:
        res = (res * x) % MOD
    return res

def solve(n, k, a):
    if k == 1:
        return max(a)
    elif k == n:
        return prod(a)
    elif max(a) < 0:
        a = sorted(a, reverse=True)
        return prod(a[:k])
    else:
        a = sorted(a, key=lambda x: -abs(x))
        num_negative = len(list(filter(lambda x: x < 0, a[:k])))
        if num_negative % 2 == 0:
            return prod(a[:k])
        else:
            i1, j1 = None, None
            for i in range(k):
                if a[i] < 0:
                    i1 = i
            for j in range(k,n):
                if a[j] >= 0:
                    j1 = j
                    break
            i2, j2 = None, None
            for i in range(k):
                if a[i] >= 0:
                    i2 = i
            for j in range(k, n):
                if a[j] < 0:
                    j2 = j
                    break
            if abs(a[j1] * a[i2]) > abs(a[i1] * b[j2]):
                return prod(a[:i1] + a[i1+1:k] + [a[j1]])
            else:
                return prod(a[:i2] + a[i2+1:k] + [a[j2]])

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

### FIXED CODE ###

MOD = 10**9 + 7

def prod(a):
    res = 1
    for x in a:
        res = (res * x) % MOD
    return res

def solve(n, k, a):
    if k == 1:
        return max(a)
    elif k == n:
        return prod(a)
    elif (max(a) < 0) and (k % 2 == 1):
        a = sorted(a, reverse=True)
        return prod(a[:k])
    else:
        a = sorted(a, key=lambda x: -abs(x))
        num_negative = len(list(filter(lambda x: x < 0, a[:k])))
        if num_negative % 2 == 0:
            return prod(a[:k])
        else:
            i1, j1 = None, None
            for i in range(k):
                if a[i] < 0:
                    i1 = i
            for j in range(k,n):
                if a[j] >= 0:
                    j1 = j
                    break
            i2, j2 = None, None
            for i in range(k):
                if a[i] >= 0:
                    i2 = i
            for j in range(k, n):
                if a[j] < 0:
                    j2 = j
                    break
            if ((i1 is None) or (j1 is None)) and ((i2 is None) or (j2 is None)):
                return prod(a[:k])
            elif (i1 is None) or (j1 is None):
                return prod(a[:i2] + a[i2+1:k] + [a[j2]])
            elif (i2 is None) or (j2 is None):
                return prod(a[:i1] + a[i1+1:k] + [a[j1]])
            elif abs(a[j1] * a[i2]) > abs(a[i1] * a[j2]):
                return prod(a[:i1] + a[i1+1:k] + [a[j1]])
            else:
                return prod(a[:i2] + a[i2+1:k] + [a[j2]])

n, k = map(int, input().split())
a = list(map(int, input().split()))
print(solve(n, k, a))
import sys

ERROR_INPUT = 'input is invalid'
OPERAND = ['+', '-', '*']
BUF = []


def main():
    stack = get_input()
    ans = calc_stack(stack=stack)
    print(ans)


def calc_stack(stack):
    if stack[-1] in OPERAND:
        BUF.append(stack[-1])
        stack.pop()
        return calc_stack(stack=stack)
    else:
        right_num = int(stack[-1])
        stack.pop()
        if stack[-1] in OPERAND:
            BUF.append(right_num)
            BUF.append(stack[-1])
            stack.pop()
            return calc_stack(stack=stack)
        else:
            left_num = int(stack[-1])
            stack.pop()
            stack.append(calc(left_num, right_num, BUF[-1]))
            BUF.pop()
            stack.extend(reversed(BUF))
            BUF.clear()

        if len(stack) == 1:
            return stack[0]
        else:
            return calc_stack(stack=stack)


def calc(left, right, ope):
    if ope == '+':
        return left + right
    elif ope == '-':
        return left - right
    elif ope == '*':
        return left * right


def get_input():
    inp = input().split(' ')
    operand_count = (inp.count(OPERAND[0]) + inp.count(OPERAND[1]) + inp.count(OPERAND[2]))

    if len(inp) < 2 or len(inp) > 100:
        print(ERROR_INPUT)
        sys.exit(1)
    elif operand_count < 1 or operand_count > 100:
        print(ERROR_INPUT)
        sys.exit(1)

    for l in inp:
        if l in OPERAND:
            continue
        elif int(l) < 0 or int(l) > 10**6:
            print(ERROR_INPUT)
            sys.exit(1)

    return inp


main()

### FIXED CODE ###

import sys

ERROR_INPUT = 'input is invalid'
OPECODE = ['+', '-', '*']
STACK = []


def main():
    inp = get_input()
    print(calc_stack(li=inp))


def calc_stack(li):
    for l in li:
        if l in OPECODE:
            STACK.append(calc(right=STACK.pop(), left=STACK.pop(), ope=l))
        else:
            STACK.append(int(l))

    return STACK[0]


def calc(left, right, ope):
    if ope == '+':
        return left + right
    elif ope == '-':
        return left - right
    elif ope == '*':
        return left * right


def get_input():
    inp = input().split(' ')
    opecode_count = 0
    operand_count = 0

    for i in inp:
        if i in OPECODE:
            opecode_count += 1
        elif int(i) < 0 or int(i) > 10**6:
            print(ERROR_INPUT)
            sys.exit(1)
        else:
            operand_count += 1

    if opecode_count < 1 or opecode_count > 100:
        print(ERROR_INPUT)
        sys.exit(1)

    if operand_count < 2 or operand_count > 100:
        print(ERROR_INPUT)
        sys.exit(1)

    return inp


main()
import itertools
 
S = list(map(int, input().strip().split()))
N = S[0]
K = S[1]
p = list(map(int, input().strip().split()))
lists = [1000000000000]
x = list(itertools.combinations(p, K))
counts = len(list(x))
for l in range(1,x+1):
    sums = sum(list(x[counts - 1]))
    if int(sums) <= int(lists[l-1]):
        lists.append(sums)
    else:
        continue

print(min(lists))

### FIXED CODE ###

S = list(map(int, input().strip().split()))
N = S[0]
K = S[1]
p = list(map(int, input().strip().split()))
lists = []
for l in range(K):
  lists.append(min(p))
  p.remove(min(p))
  
print(sum(lists))
import numpy as np
N = int(input())
A = np.array(input().split(), dtype=np.int32)
B = np.array(input().split(), dtype=np.int32)
C = - np.array(input().split(), dtype=np.int32)
 
A.sort()
B.sort()
C.sort()
 
cnt_A = np.searchsorted(A,B,side='left')
cnt_C = np.searchsorted(C,-B,side='left')
 
answer = (cnt_A * cnt_C).sum()
print(answer)

### FIXED CODE ###

import numpy as np
N = int(input())
A = np.array(input().split(), dtype=np.int32)
B = np.array(input().split(), dtype=np.int32)
C = - np.array(input().split(), dtype=np.int32)
 
A.sort()
B.sort()
C.sort()
 
cnt_A = np.searchsorted(A,B,side='left')
cnt_C = np.searchsorted(C,-B,side='left')
 
answer = (cnt_A * cnt_C).sum()
print(answer)
a,b,c=map(int,input().split())
MAX=max[a,b,c]
SUM=sum[a,b,c]
if MAX==SUM-MAX:
  print(Yes)
else:
  print(No)

### FIXED CODE ###

a,b,c=map(int,input().split())
l=[a,b,c]
MAX=max(l)
SUM=sum(l)
if MAX==SUM-MAX:
  print("Yes")
else:
  print("No")
import sys
a=int(input())
b=list(map(int,input().split()))
c=[]
for i in range(a):
  c+=str(b[i])
  for i in range(len(c)):
    if int(c[i+1])==b[i]:
      print('YES')
      sys.exit()
print('NO')
      
    

### FIXED CODE ###

a=int(input())
b=list(map(int,input().split()))
d=len(b)
c=len(set(b))
if c==d:
  print('YES')
else:
  print('NO')
N = int(input())
M = [list(map(int, input().split())) for _ in range(N)]

s = []
l = []
top = 2*(10**9)+1
low = 0
for j in range(N):
    t = sum(M[j])
    if low == t:
        s.append(M[j])
    elif low < t:
        low = t
        s = []
        s.append(M[j])

    if top == t:
        l.append(M[j])
    elif top > t:
        top = t
        l = []
        l.append(M[j])


def cal_man(a, b):
    return abs(a[0] - b[0]) + abs(a[1] - b[1])


s.sort()
l.sort()


high = []
small = []
low = 2*(10**9)+1
top = 0
for j in range(N):
    t = M[j][1] - M[j][0]
    if low > t:
        low = t
        small = []
        small.append(M[j])
    elif low == t:
        small.append(M[j])

    if top < t:
        top = t
        high = []
        high.append(M[j])
    elif top == t:
        high.append(M[j])
high.sort()
small.sort()


print(max([cal_man(s[0], l[-1]), cal_man(s[-1], l[0]),
           cal_man(high[0], small[-1]), cal_man(high[-1], small[0])]))


### FIXED CODE ###

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

s = []
l = []
top = 2*(10**9)+1
low = 0
for j in range(N):
    t = sum(M[j])
    if low == t:
        s.append(M[j])
    elif low < t:
        low = t
        s = []
        s.append(M[j])

    if top == t:
        l.append(M[j])
    elif top > t:
        top = t
        l = []
        l.append(M[j])


def cal_man(a, b):
    return abs(a[0] - b[0]) + abs(a[1] - b[1])


s.sort()
l.sort()


high = []
small = []
lowest = 2*(10**9)+1
topest = -2*(10**9)+1
for j in range(N):
    t = M[j][1] - M[j][0]
    if lowest > t:
        lowest = t
        small = []
        small.append(M[j])
    elif lowest == t:
        small.append(M[j])

    if topest < t:
        topest = t
        high = []
        high.append(M[j])
    elif topest == t:
        high.append(M[j])
high.sort()
small.sort()


print(max([cal_man(s[0], l[-1]), cal_man(s[-1], l[0]),
           cal_man(high[0], small[-1]), cal_man(high[-1], small[0])]))
from collections import Counter
import math

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

even = V[0::2]
odd = V[1::2]
even_max_cnt = Counter(even).most_common()
odd_max_cnt = Counter(odd).most_common()

cost = math.inf
res_freq_even = None
res_freq_odd = None
for e in even_max_cnt:
    for o in odd_max_cnt:
        if e[0] == o[0]:
            continue
        cost = min(cost, e[1]+o[1])
        res_freq_even = e
        res_freq_odd = o

if even_max_cnt[0][1] == len(even) and \
        odd_max_cnt[0][1] == len(odd) and \
        even_max_cnt[0][0] == odd_max_cnt[0][0]:
    ans = len(even)
else:
    ans = (len(even) - even_max_cnt[0][1]) + (len(odd) - odd_max_cnt[0][1])

print(ans)


### FIXED CODE ###

from collections import Counter

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

even = V[0::2]
odd = V[1::2]
even_max_cnt = Counter(even).most_common(2)
odd_max_cnt = Counter(odd).most_common(2)

if even_max_cnt[0][0] != odd_max_cnt[0][0]:
    ans = len(V) - even_max_cnt[0][1] - odd_max_cnt[0][1]
else:
    if len(even_max_cnt) == 1 or len(odd_max_cnt) == 1:
        ans = len(V) // 2
    else:
        ans = len(V) - max(even_max_cnt[0][1]+odd_max_cnt[1][1],
                           even_max_cnt[1][1]+odd_max_cnt[0][1])

print(ans)
x,y=input().split()
if y%2==1 or x*2>y or x*4<y:
  a="No"
else:
  a="Yes"
print(a)

### FIXED CODE ###

x,y=input().split()
x=int(x)
y=int(y)
if y%2==1 or x*2>y or x*4<y:
  a="No"
else:
  a="Yes"
print(a)
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int n;
	cin >>n;
	int a[110];
	for(int i=0;i<n;++i)cin >>a[i];
	sort(a,a+n,greater<int>());
	int alic=0;
	int bob=0;
	for(int i=0;i<n;++i){
		if(i%2==0){
			alic+=a[i];
		}
		else{
			bob+=a[i];
		}
	}
	cout <<alic-bob<<endl;
}


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
a.sort()
a.reverse()
v=sum(a)
alice_count=0
for i in range(n):
    if i%2==0:
        alice_count+=a[i]
bob_count=v-alice_count
print(alice_count-bob_count)
m = 0
cnt = 0
for i in range(N):
    
    cnt += c[i][1]
    m += c[i][0] * c[i][1]
     
    if cnt == M:
        print(m)
        break
    elif cnt > M:
        print(m - c[i][0] * (cnt - M))
        break
    else:
        continue

### FIXED CODE ###

N, M = map(int, input().split())
a, b = [0 for _ in range(N)], [0 for _ in range(N)]
for i in range(N):
    a[i], b[i] = (list(map(int, input().split())))
c = []
for i in range(N):
    c.append([a[i],b[i],i])
c = sorted(c, key=lambda x: x[0])
m = 0
cnt = 0
for i in range(N):
    
    cnt += c[i][1]
    m += c[i][0] * c[i][1]
     
    if cnt == M:
        print(m)
        break
    elif cnt > M:
        print(m - c[i][0] * (cnt - M))
        break
    else:
        continue
A = list(map(int, input().split()))

SUM_A = sum(A)

if SUM_A <= 21:
    pritn("win") 
else:
    print("bust")

### FIXED CODE ###

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

SUM_A = sum(A)

if SUM_A <= 21:
    print("win") 
else:
    print("bust")
c = 0
while True:
    x = int(input())
    if x == 0;
        break:

    c += 1
    print('Case', str(c) + ':', x)

### FIXED CODE ###

c = 0
while True:
    x = int(input())
    if x == 0:
        break;

    c += 1
    print('Case', str(c) + ':', x)