Harryxun/stf_run huggingface dataset:
N = int(input())
xy = []
x = []
y = []
for i in range(N):
  xi,yi = map(int,input().split())
  xy.append([xi,yi])
  x.append(xi)
  y.append(yi)

res = []
count = 0
for i in range(N):
  for j in range(i+1,N):
#コストの和の最小値を求める
#これ以上進めない点が何個あるか数えれば良い
    p = x[i] - x[j]
    q = y[i] - y[j]
    count = 0
    for item in xy:
      if [item[0]+p,item[1]+q] not in xy:
        count += 1
    if count != 0: res.append(count)


print(min(res))

### FIXED CODE ###

N = int(input())
xy = []
x = []
y = []
for i in range(N):
  xi,yi = map(int,input().split())
  xy.append([xi,yi])
  x.append(xi)
  y.append(yi)

res = []
count = 0
for i in range(N):
  for j in range(i,N):
#コストの和の最小値を求める
#これ以上進めない点が何個あるか数えれば良い
    p = x[i] - x[j]
    q = y[i] - y[j]
    count = 0
    for item in xy:
      if [item[0]+p,item[1]+q] not in xy:
        count += 1
    if count != 0: res.append(count)

if res == []:
  res.append(1)

print(min(res))
from functools import reduce, gcd

def main():
  n, k = map(int, input().split())
  la = list(map(int, input().split()))
  if max(la) > k and (max(la) - k) % (reduce(gcd, la)) == 0:
    print('POSSIBLE')
  else:
    print('IMPOSSIBLE')
  
if __name__=='__main__':
  main()

### FIXED CODE ###

#!/usr/bin/python3
# -*- coding:utf-8 -*-

from functools import reduce

def calc_gcd(a, b):
  if a > b:
    a, b = b, a
  while b % a:
    a, b = b % a, a
  return a

def main():
  n, k = map(int, input().split())
  la = list(map(int, input().split()))
  if max(la) >= k and k % (reduce(calc_gcd, la)) == 0:
    print('POSSIBLE')
  else:
    print('IMPOSSIBLE')
  
if __name__=='__main__':
  main()
a,b=int(input())
if a<10 and b<10:
  print(a*b)
else:
  print('No')

### FIXED CODE ###

a,b=map(int,input().split())
if a<10 and b<10:
  print(a*b)
else:
  print('-1')
n, m = map(int, input().split())
a = [int(input()) for i in range(m)]
interval_max = 0
for i in range(len(a)-1):
    if a[i+1] - a[i] == 1:
        print(0)
        exit()
    interval_max = max(interval_max, a[i+1] - a[i])
a.insert(0, 0)
a.append(n)
for i in range(len(a)-1):
    interval_max = max(interval_max, a[i+1] - a[i])

step = [0]*(interval_max+1)
step[0] = step[1] = step[2] = 1
for i in range(3,interval_max+1):
    step[i] = (step[i-2] + step[i-1]) % 1000000007
sum_step = 1
# print(a)
for i in range(len(a)-1):
    if i == 0 or i == len(a)-2:
        sum_step *= step[a[i+1] - a[i]]
        # print(step[a[i+1] - a[i]])
    else:
        sum_step *= step[a[i+1] - a[i] - 1]
        # print(step[a[i+1] - a[i]] - 1)
    sum_step = sum_step % 1000000007
print(sum_step)
# print(step)

### FIXED CODE ###

n, m = map(int, input().split())
if m > 0:
    a = [int(input()) for i in range(m)]
    interval_max = 0
    for i in range(len(a)-1):
        if a[i+1] - a[i] == 1:
            print(0)
            exit()
        interval_max = max(interval_max, a[i+1] - a[i])
else:
    a = []
    interval_max = n
a.insert(0, 0)
a.append(n)
for i in range(len(a)-1):
    interval_max = max(interval_max, a[i+1] - a[i])

fibb = [0]*(max(interval_max+2, 3))
fibb[0] = fibb[1] = fibb[2] = 1
for i in range(3,interval_max+2):
    fibb[i] = (fibb[i-2] + fibb[i-1]) % 1000000007
sum_step = 1
# print(a)
if m == 0:
    sum_step = fibb[n+1]
else:
    for i in range(len(a)-1):
        if i == 0 or i == len(a)-2:
            sum_step *= fibb[a[i+1] - a[i]]
            # print(fibb[a[i+1] - a[i]])
        else:
            sum_step *= fibb[a[i+1] - a[i] - 1]
            # print(fibb[a[i+1] - a[i]] - 1)
        sum_step = sum_step % 1000000007
print(sum_step)
# print(step)
a = x * x * x
print({}.format(a))

### FIXED CODE ###

x = int(input())
print(x*x*x)
N=int(input())
S=input()
a,i,j=0
while j<N:
  t=S[i:j]
  if t in S[j:]:
    a=max(a,len(t))
    j+=1
  else:
    i+=1
print(a)

### FIXED CODE ###

N=int(input())
S=input()
a=i=j=0
while j<N:
  t=S[i:j]
  if t in S[j:]:
    a=max(a,len(t))
    j+=1
  else:
    i+=1
print(a)
n=int(input())
ans=""
while N>0:
    n-=1
    ans+=chr(ord('a')+N%26)
    n//=26
    print(ans[::-1])

### FIXED CODE ###

n=int(input())
ans=""
while n>0:
    n-=1
    ans+=chr(ord('a')+n%26)
    n//=26
print(ans[::-1])
s = list(map(str,input()))
s[3] = "8"
print(*s[0:3],"8",*s[4:],sep="")

### FIXED CODE ###

s = list(map(str,input()))
s[3] = "8"
print(*s,sep="")
a=int(input())
li = list(map(int,input().split()))
 
result = 1
for num in li:
  result = result * num
  if result > 10 ** 18:
    print(-1)
    
print(result)

### FIXED CODE ###

x,y = map(int,input().split())
print(x * y)
a,b=int(input().split())
print(max(a+b,a-b,a*b))


### FIXED CODE ###

a,b=map(int,input().split())
print(max(a + b,a - b,a * b))
from math import factorial

inputted = list(map(int, input().split()))
N = inputted[0]
M = inputted[1]

nPk = lambda n, k: factorial(n) / (factorial(k) * factorial(n - k))

answer = nPk(N, 2) +  nPk(M, 2)
answer = int(answer)

print(answer)


### FIXED CODE ###

from math import factorial

inputted = list(map(int, input().split()))
N = inputted[0]
M = inputted[1]

nPk = lambda n, k: 0 if n - k < 0 else factorial(n) / (factorial(k) * factorial(n - k))

answer = nPk(N, 2) +  nPk(M, 2)
answer = int(answer)

print(answer)
import math
import random

line1 = int(input())
line2 = str(input()).split(" ")
keepTrack = dict()
keys = []
keys = list(set(line2))
for element in keys:
    keepTrack[element] = line2.count(element)

sum = 0
for key in keys:
    ##sum += abs()
    if (key < keepTrack[key]):
        sum += -key + keepTrack[key]
    elif (key > keepTrack[key]):
        sum += keepTrack[key]
print(sum)


### FIXED CODE ###

from collections import Counter
a = int(input())
l = list(map(int, input().split()))
#i = 1

c=Counter(l)
d = dict(c)
kv = []
for k,v in d.items():
    if k>v:
        kv.append(v)
    elif k<v:
        t = v-k
        kv.append(t)
s = sum(kv)
print(s)
N = int(input())
L = list(map(int,input().split()))

m = L.pop(max(L))
if sum(L) > m:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

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

m = L.pop(L.index(max(L)))
if sum(L) > m:
    print('Yes')
else:
    print('No')
a , b , c = soted(map(int, input().split()))
print(c * 10 + b + a)

### FIXED CODE ###

a , b , c = sorted(map(int, input().split()))
print(c * 10 + b + a)
import sympy
f = 0
N = int(input())
for i in range(N+1):
    x = list(sympy.divisors(i))
    f = f + (i * len(x))
print(f)

### FIXED CODE ###

N = int(input())
count = 0
for i in range(1,N+1):
    t = N//i
    count += i * t*(t+1)/2
print(int(count))
n = int(input())
alist = list(map(int,input().split(' ')))

from collections import defaultdict

resdict = {}

from collections import Counter

c = Counter(alist)

old_cdict = dict(c)

cdict = dict((key, value) for (key, value) in old_cdict.items() if value >= 2)

# print(cdict)

maxi = 0

for k, v in cdict.items():
    maxi += v * (v - 1) // 2

for a in alist:
    num = cdict[a]
    if num in resdict:
        # print('used')
        print(resdict[num])
        continue
    # print('not used')
    if a in cdict:
        cdict[a] -= 1
        temp = 0
        for k,v in cdict.items():
            temp += v*(v-1)//2
        print(temp)
        resdict[num] = temp
        cdict[a] += 1
    else:
        print(maxi)

### FIXED CODE ###

n = int(input())
alist = list(map(int,input().split(' ')))

from collections import defaultdict

resdict = {}

from collections import Counter

c = Counter(alist)

cdict = dict(c)

# cdict = dict((key, value) for (key, value) in old_cdict.items() if value >= 2)

# print(cdict)

maxi = 0

for k, v in cdict.items():
    maxi += v * (v - 1) // 2

for a in alist:
    num = cdict[a]
    if num in resdict:
        # print('used')
        print(resdict[num])
        continue
    # print('not used')
    if a in cdict:
        cdict[a] -= 1
        temp = 0
        for k,v in cdict.items():
            temp += v*(v-1)//2
        print(temp)
        resdict[num] = temp
        cdict[a] += 1
    else:
        print(maxi)
a,b,c = sorted(int(input().split()))
print(c*10+b+a)

### FIXED CODE ###

a,b,c = sorted(map(int,input().split()))
d=str(c)+str(b)
print(a+int(d))
[H, N] = [int(x) for x in input().split()]
A = list(map(int, input().split()))
arr = sorted(A, reverse=True)
while N > 0:
    arr.pop(0)
    N -= 1
    if N == 0:
        break
print(sum(arr))

### FIXED CODE ###

N, K = map(int, input().split())
H = map(int,input().split())
print(sum(sorted(H, reverse=True)[K::]))
n, k = map(int, input().split())
h = [int(input()) for i in range(n)]
h.sort()
answer = h[-1] - h[0]
for i in range(n - k + 1):
    answer = min(answer, h[i + k - 1] - h[i])
print(answer)

### FIXED CODE ###

d = int(input())
if (d == 22):
    print('Christmas Eve Eve Eve')
elif (d == 23):
    print('Christmas Eve Eve')
elif (d == 24):
    print('Christmas Eve')
else:
    print('Christmas')
def solve():
    s = list(input())
    K = int(input())

    for i in range(len(s)):
        distToA = (ord('z')+1 - ord(s[i])) % ord('a')
        if distToA <= K:
            s[i] = 'a'
            K -= distToA
    else:
        s[-1] = chr(ord(s[-1]) + K)
    
    print("".join(s))

if __name__ == '__main__':
    solve()

### FIXED CODE ###

def solve():
    s = list(input())
    K = int(input())

    for i in range(len(s)):
        distToA = (ord('z')+1 - ord(s[i])) % 26
        if distToA <= K:
            s[i] = 'a'
            K -= distToA
    else:
        s[-1] = chr(ord(s[-1]) + K%26)
    
    print("".join(s))

if __name__ == '__main__':
    solve()
n = []
for i in range(5):
    n.append(input())

k = input()

if n[4] - n[0] <= k:
    print('Yay!')
else:
    print(':(')


### FIXED CODE ###


a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
    
if e - a <= k:
    print('Yay!')
else:
    print(':(')
import math
from functools import reduce

n = int(input())
a_list = list(map(int, input().split()))
max = a_list[n - 1] + 100
memo = [0] * max

for a in a_list:
    print(a)
    print(memo)
    memo[a] += 1

for i in range(2, max):
    if sum(memo[i::i]) > 1:
        if reduce(math.gcd, a_list) == 1:
            print("setwise coprime")
            exit()
        else:
            print("not coprime")
            exit()

print("pairwise coprime")


### FIXED CODE ###

import math
from functools import reduce
L = 10**6 + 1
n = int(input())
a_list = list(map(int, input().split()))
memo = [0] * L

for a in a_list:
    memo[a] += 1

for i in range(2, L):
    if sum(memo[i::i]) > 1:
        if reduce(math.gcd, a_list) == 1:
            print("setwise coprime")
            exit()
        else:
            print("not coprime")
            exit()

print("pairwise coprime")
x = int(raw_input())
print Math.pow(x, 3)


### FIXED CODE ###

x = int(raw_input())
print pow(x, 3)
import sys

k = input()
x = input()

if k*500<=x:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

import sys
# input=sys.stdin.readline

val = []
val = input()

arrays = val.split(' ')
a = int(arrays[0])*500

if a>=int(arrays[1]):
    print("Yes")
elif a<int(arrays[1]):
    print("No")

sys.exit()
a,b = map(int,input.split())
print((a-1)*(b-1))

### FIXED CODE ###

a,b = map(int,input().split())
print((a-1)*(b-1))
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

N,M = map(int,input().split())
S = list(str(input()))
T = list(str(input()))

L = lcm(N,M)
if L == max(N,M):
  L *= 2
X = [""]*L
if S[0] != T[0]:
  print(-1)
  exit()
else:
  X[0] = S[0]

for i in range(1,N):
  X[i*L//N] = S[i]
for j in range(1,M):
  if X[j*L//M] == "" or X[j*L//M] == T[j]:
    pass
  else:
    print(-1)
    exit()

print(L)

### FIXED CODE ###

import math
 
N,M = map(int,input().split())
S = list(str(input()))
T = list(str(input()))
g = math.gcd(N,M)
gn,gm = N//g,M//g
for i in range(g):
  if S[i*gn] != T[i*gm]:
    print(-1)
    exit()

print(gn*gm*g)
X=input()
Y=X*X*X
print(Y)

### FIXED CODE ###

x=int(input())
y=x*x*x
print(y)
n,k=map(int,input().split())
s=input()
s[k-1]=s[k-1].lower()
print(*s,sep="")

### FIXED CODE ###

n,k=map(int,input().split())
s=list(input())
s[k-1]=s[k-1].lower()
print(*s,sep="")
A,B=input().split()

mydict = {"A":11, "B":12, "C":14, , "D":13, "E":14, "F":15}

print('>') if mydict(A) > mydict(B) else print('<') if mydict(A) < mydict(B) else print('=')

### FIXED CODE ###

A,B=input().split()

mydict = {"A":10, "B":11, "C":12, "D":13, "E":14, "F":15}

print('>') if mydict[A] > mydict[B] else print('<') if mydict[A] < mydict[B] else print('=')
n=input()
A=list(map(int,input.split()))
t=sum(A)-1
ans=0
for a in A:
    ans += t % a
print(ans)


### FIXED CODE ###

def main():
    n = int(input())
    A = list(map(int, input().split()))
    print(sum(A) - n)

if __name__ == "__main__":
    main()
l,r = map(int,input().split())
if l%2019<=r%2019:
  print(l%2019*(l+1)%2019)
else:
  a = sorted(list(l%2019,(l+1)%2019,r%2019,(r-1)%2019))
  print(a[0]*a[1])

### FIXED CODE ###

l,r = map(int,input().split())
m = 2018
if r-l>=2019:
  print(0)
else:
  for i in range(l,r+1):
    for j in range(i+1,r+1):
      a = (i*j)%2019
      m = min(a,m)
  print(m)
import sys
lines = sys.stdin.readlines()
line1 = lines.pop(0).split(' ')
#print(line1)
N = int(line1[0])
M = int(line1[1])

#print(N)
#print(M)

str = [0] * N

ans = []

a = 0
b = 0
c = 0

for i in range(M):
  line = lines.pop(0).split(' ')
#  print(line)
  s = int(line[0])
  c = int(line[1])
#  print(s)
#  print(c)
  str[s-1] = c
  if N == 3:
    ret = int(str[0])*100 + int(str[1])*10 + int(str[2])
  elif N == 2:
    ret = int(str[0])*10 + int(str[1])
  else:
    ret = int(str[0])
  
  ans.append(ret)
  
for obj in ans[:]:
  if (obj / (10**(N-1))) < 1:
    ans.remove(obj)

print(min(ans))


### FIXED CODE ###

import sys
import math
lines = sys.stdin.readlines()
line1 = lines.pop(0).split(' ')
#print(line1)
N = int(line1[0])
M = int(line1[1])
#print(N)
#print(M)

#初期化
str = [10] * N
#print(str)

for i in range(M):
  line = lines.pop(0).split(' ')
#  print(line)
  s = int(line[0])
  c = int(line[1])
#  print(s)
#  print(c)
#  print(str[s-1])
#  if str[s-1] > c:
  if str[s-1] == 10:
    str[s-1] = c
  elif(str[s-1] == c):
    #同じ値の場合は何もしない
    pass
  else:
    #既に何かしらの異なる値が入っている場合はエラー
    print('-1')
    sys.exit()

#print(str)
#str = [0 if i == 10 else i for i in str]
#print(str)
if N == 3:
  if str[0] == 10 and str[1] == 10:
    str[0] = 1
    str[1] = 0
  elif str[0] == 10 and str[1] != 10:
    str[0] = 1
  elif str[0] != 10 and str[1] == 10:
    str[1] = 0

  str[2] = 0 if str[2] == 10 else str[2]

  ret = (int(str[0])*100 + int(str[1])*10 + int(str[2])) if int(str[0]) > 0 else -1
elif N ==2:
  str[0] = 1 if str[0] == 10 else str[0]
  str[1] = 0 if str[1] == 10 else str[1]
  ret = (int(str[0])*10 + int(str[1])) if int(str[0]) > 0 else -1
elif N ==1:
  str[0] = 0 if str[0] == 10 else str[0]
  ret = int(str[0])

print(ret)
import math

def isprime(number):
    for i in range(2, round(math.sqrt(number)) + 1):
        if number % i == 0:
            return False
    return True

A, B = map(int, input().split())
count = 1
N = math.gcd(A, B)

for i in range(2, N + 1):
    if N % i == 0:
        if isprime(i):
            count += 1

print(str(count))


### FIXED CODE ###

from fractions import gcd
def f(n):
    tmp = n
    cnt = 0
    i = 2
    while i <= n**0.5 + 1:
        if tmp < i:
            break
        if tmp % i == 0:
            cnt += 1
            while tmp % i == 0:
                tmp //= i
        i += 1
    if tmp != 1:
        cnt += 1
    return cnt

A, B = map(int, input().split())
g = gcd(A, B)
ans = f(g) + 1
print(ans)
print(eval(input().replace('.','').replace(' ','*'))//100)

### FIXED CODE ###

A, B = map(int, input().replace('.', '').split())
print(A*B//100)
from collections import defaultdict

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

if len(set(L)) == 1:
    print(N//2)
    exit()
if N == 2:
    print(0)
    exit()


d_even = defaultdict(int)
d_odd = defaultdict(int)

for i in range(N):
    v = L[i]
    if i % 2 == 0:
        d_even[v] += 1
    else:
        d_odd[v] += 1

l_even = sorted(d_even.items(), key=lambda x: -x[1])
l_odd = sorted(d_odd.items(), key=lambda x: -x[1])

odd_1 = l_even[0]
even_1 = l_even[0]

if even_1[0] != even_1[0]:
    print(N - odd_1[1] - even_1[1])
    exit()

even_2 = l_even[1]
odd_2 = l_odd[1]

ans = N
ans = min(N, N - odd_1[1] - even_2[1])
ans = min(N, N - odd_2[1] - even_1[1])
print(ans)


### FIXED CODE ###

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

vo = [0]*(10**5+1)
ve = [0]*(10**5+1)

for i in range(n):
    if i % 2 == 0:
        vo[v[i]] += 1
    else:
        ve[v[i]] += 1

if vo.index(max(vo)) == ve.index(max(ve)):
    ans1 = sum(vo) - max(vo) + sum(ve) - sorted(ve)[-2]
    ans2 = sum(vo) - sorted(vo)[-2] + sum(ve) - max(ve)
    print(min(ans1, ans2))
else:
    print(sum(vo) - max(vo) + sum(ve) - max(ve))
# coding: utf-8
import sys
from bisect import bisect_left, bisect_right, insort

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
A = [0] + lr()  # 1-indexed
graph = [[] for _ in range(N+1)]  # 1-indexed
for _ in range(N-1):
    a, b = lr()
    graph[a].append(b)
    graph[b].append(a)

answer = [0] * (N+1)  # 1-indexed
INF = 10 ** 6
parent = [0] * (N+1)

def dfs(n, arr):
    """arrはLISのリスト、answerのリストを更新してから子にarrを渡す"""
    i = bisect_left(arr, INF)
    answer[n] = i
    for c in graph[n]:
        if c == parent[n]:
            continue
        parent[c] = n
        new = arr[:]
        i = bisect_left(new, A[c])
        new[i] = A[c]
        dfs(c, new)

B = [INF] * N
B[0] = 0
dfs(1, B)
for a in answer[1:]:
    print(a)


### FIXED CODE ###

# coding: utf-8
import sys
from bisect import bisect_left, bisect_right, insort
sys.setrecursionlimit(10 ** 7)

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
A = [0] + lr()  # 1-indexed
graph = [[] for _ in range(N+1)]  # 1-indexed
for _ in range(N-1):
    a, b = lr()
    graph[a].append(b)
    graph[b].append(a)

answer = [0] * (N+1)  # 1-indexed
INF = 10 ** 10
parent = [-1] * (N+1)

def dfs(n):
    """arrはLISのリスト、answerのリストを更新してから子にarrを渡す"""
    i = bisect_left(dp, INF)
    answer[n] = i
    for c in graph[n]:
        if c == parent[n]:
            continue
        parent[c] = n
        i = bisect_left(dp, A[c])
        old = dp[i]
        dp[i] = A[c]
        dfs(c)
        dp[i] = old

dp = [INF] * (N+1)
dp[0] = A[1]
dfs(1)
for a in answer[1:]:
    print(a)
lines = [input().split() for i in range(3)]
 
num = int(input())
bs = []
for i in range(num):
  bs.append(input())
 
hits = []
for i in bs:
  for row_index in range(len(lines)):
    for col_index in range(len(line)):
      if lines[row_index][col_index] == i:
        hits.append((row_index,col_index))
row_hits = (0,0,0)
col_hits = (0,0,0)
stride_hits = (0,0)
 
for hit in hits:
  r = hit[0]
  c = hit[1]
  row_hits[r]+=1
  col_hits[c]+=1
  if r == c:
    stride_hits[0]+=1
  else if (r,c) == (0,2) or (r,c) == (1,1) or (r,c) == (2,0) :
    stride_hits[1]+=1
 
if max(row_hits)>= 3 or max(col_hits)>=3 or max(stride_hits)>= 3:
  print 'Yes'
else:
  print 'No'
  

### FIXED CODE ###

lines = [input().split() for i in range(3)]
 
num = int(input())
bs = []
for i in range(num):
  bs.append(input())
 
hits = []
for i in bs:
  for row_index in range(len(lines)):
    for col_index in range(len(lines[row_index])):
      if lines[row_index][col_index] == i:
        hits.append((row_index,col_index))
row_hits = [0,0,0]
col_hits = [0,0,0]
stride_hits = [0,0]
 
for hit in hits:
  r = hit[0]
  c = hit[1]
  row_hits[r]+=1
  col_hits[c]+=1
  if r == c:
    stride_hits[0]+=1
  if (r,c) == (0,2) or (r,c) == (1,1) or (r,c) == (2,0) :
    stride_hits[1]+=1
 
if max(row_hits)>= 3 or max(col_hits)>=3 or max(stride_hits)>= 3:
  print ('Yes')
else:
  print ('No')
from collections import Counter

N = int(input())
V = tuple(map(int, input().split()))
X, Y = Counter(), Counter()
for i in range(0, N):
    if i & 1:
        Y[V[i]] += 1
    else:
        X[V[i]] += 1
x = sorted(X.items(), reverse=True, key=lambda x: x[1])[:2]
y = sorted(Y.items(), reverse=True, key=lambda x: x[1])[:2]
if x[0][0] == y[0][0]:
    ans = N
    tmp = 0
    for i in range(0, N):
        if i & 1:
            if V[i] != y[1][0]:
                tmp += 1
        else:
            if V[i] != x[0][0]:
                tmp += 1
    ans = min(ans, tmp)
    tmp = 0
    for i in range(0, N):
        if i & 1:
            if V[i] != y[0][0]:
                tmp += 1
        else:
            if V[i] != x[1][0]:
                tmp += 1
    ans = min(ans, tmp)
else:
    ans = 0
    for i in range(0, N):
        if i & 1:
            if V[i] != y[0][0]:
                ans += 1
        else:
            if V[i] != x[0][0]:
                ans += 1
print(ans)


### FIXED CODE ###

from collections import Counter

N = int(input())
V = tuple(map(int, input().split()))
X, Y = Counter(), Counter()
for i in range(0, N):
    if i & 1:
        Y[V[i]] += 1
    else:
        X[V[i]] += 1
if len(X) != 1:
    x = sorted(X.items(), reverse=True, key=lambda x: x[1])[:2]
else:
    x = sorted(X.items(), reverse=True, key=lambda x: x[1])[:1]
if len(Y) != 1:
    y = sorted(Y.items(), reverse=True, key=lambda x: x[1])[:2]
else:
    y = sorted(Y.items(), reverse=True, key=lambda x: x[1])[:1]
if x[0][0] == y[0][0]:
    ans = N
    tmp = 0
    if len(y) == 1:
        for i in range(0, N):
            if i & 1:
                if V[i] != y[0][0]+1:
                    tmp += 1
            else:
                if V[i] != x[0][0]:
                    tmp += 1
    else:
        for i in range(0, N):
            if i & 1:
                if V[i] != y[1][0]:
                    tmp += 1
            else:
                if V[i] != x[0][0]:
                    tmp += 1
    ans = min(ans, tmp)
    tmp = 0
    if len(x) == 1:
        for i in range(0, N):
            if i & 1:
                if V[i] != y[0][0]:
                    tmp += 1
            else:
                if V[i] != x[0][0]+1:
                    tmp += 1
    else:
        for i in range(0, N):
            if i & 1:
                if V[i] != y[0][0]:
                    tmp += 1
            else:
                if V[i] != x[1][0]:
                    tmp += 1
    ans = min(ans, tmp)
else:
    ans = 0
    for i in range(0, N):
        if i & 1:
            if V[i] != y[0][0]:
                ans += 1
        else:
            if V[i] != x[0][0]:
                ans += 1
print(ans)
print(eval(*input()))

### FIXED CODE ###

a,b,c=input().split()
print(eval(a+b+c))
import numpy as np
n, s = map(int, input().split())
a = list(map(int, input().split()))

dp = np.array([0 for _ in range(s+1)])
dp[0] = 1

for i in range(n):
    plus = [dp[j-a[i]]  if j-a[i] >=0 else 0 for j in range(s+1)]
    dp = dp*2
    dp = dp+plus

print(dp[s])

### FIXED CODE ###

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

dp = [0 for _ in range(s+1)]
dp[0] = 1

for i in range(n):
    plus = [dp[j-a[i]]  if j-a[i] >=0 else 0 for j in range(s+1)]
    for j in range(s+1):
        dp[j] = (dp[j]*2 +plus[j])%mod

print(dp[s])
# -*- coding: utf-8 -*-

n = int(input())
t = [0] * n
x = [0] * n
y = [0] * n
for i in range(n):
    t[i],x[i],y[i] = map(int,input().split())

def travel(x,y,t):
    if t == t_st:
        if x == x_st and y == y_st:
            return True
        else:
            return False
    if travel(x-1,y,t-1) or travel(x,y-1,t-1) or travel(x+1,y,t-1) or travel(x,y+1,t-1):
        return True
    else:
        return False

t_st = 0
x_st = 0
y_st = 0

ans = travel(x[0],y[0],t[0])

for i in range(1,n):
    x_st = x[i-1]
    y_st = y[i-1]
    t_st = t[i-1]
    if travel(x[i],y[i],t[i]):
        pass
    else:
        ans = False

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


### FIXED CODE ###

# -*- coding: utf-8 -*-

n = int(input())
t = [0] * n
x = [0] * n
y = [0] * n
for i in range(n):
    t[i],x[i],y[i] = map(int,input().split())

def travel(x,y,t):
    if abs(t-t_st) >= abs(x-x_st) + abs(y-y_st) and abs(t-t_st) % 2 == (abs(x-x_st) + abs(y-y_st)) % 2:
        return True
    else:
        return False

t_st = 0
x_st = 0
y_st = 0

ans = travel(x[0],y[0],t[0])

for i in range(1,n):
    x_st = x[i-1]
    y_st = y[i-1]
    t_st = t[i-1]
    if travel(x[i],y[i],t[i]):
        pass
    else:
        ans = False

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