Harryxun/stf_run huggingface dataset:
moji = input()
N = moji[0]
A = moji[2]
B = moji[4]

res = ""

if ((int)(B) - (int)(A))%2 == 0:
    res = "Alice"
else:
    res = "Borys"

print(res)


### FIXED CODE ###

moji = input()
moji = moji.split(" ")
N = moji[0]
A = moji[1]
B = moji[2]

res = ""

if ((int)(B) - (int)(A))%2 == 0:
    res = "Alice"
else:
    res = "Borys"

print(res)
from math import factorial
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 10**4
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

n, k = map(int, input().split())
a = sorted(map(int, input().split()))


mod = 10**9+7
def main():
  s = 0
  l = len(a)
  for i in range(l):
    s += a[i] * cmb(i, k - 1, mod)
    s -= a[i] * cmb(l - i -1 , k - 1, mod)

    s %= mod
  print(s)
main()

### FIXED CODE ###

from math import factorial
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 10**5
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

n, k = map(int, input().split())
a = sorted(map(int, input().split()))


mod = 10**9+7
def main():
  s = 0
  l = len(a)
  for i in range(l):
    s += a[i] * cmb(i, k - 1, mod)
    s -= a[i] * cmb(l - i -1 , k - 1, mod)

    s %= mod
  print(s)
main()
# -*- Coding: utf-8 -*-

a, b, c = map(int, input().split())
candy = [a, b, c]
if max(candy) == sum(candy) - max(candy):
    print("YES")
else:

### FIXED CODE ###

[a,b,c]=list(map(int,input().split()))
if a+b==c or a+c==b or b+c==a :
    print("Yes")
else:
    print("No")
[N,M,K]=map(int,(input().split()))
A=[0]*N
B=[0]*M
A=list(map(int,input().split()))
B=list(map(int,input().split()))



Kc=K
bookc=0

Ai=0
Bi=0

while Kc>0:
    if Ai<N:
        if Bi<M:
            if A[Ai]<=B[Bi] and A[Ai]<=Kc:
                bookc+=1
                Kc-=A[Ai]
                Ai+=1

            elif B[Bi]<=Kc:
                bookc+=1
                Kc-=B[Bi]
                Bi+=1
            else:
                break
        elif A[Ai]<=Kc:
            bookc+=1
            Kc-=A[Ai]
            Ai+=1
        else:
            break
    elif Bi<M:
        if B[Bi]<=Kc:
            bookc+=1
            Kc-=B[Bi]
            Bi+=1
        else:
            break
    if Ai==N and Bi==M:
        break

print(bookc)





    
        

### FIXED CODE ###

a=int(input())
print(a+a**2+a**3)
import sys
sys.setrecursionlimit(100000)

N = int(input())

min = float('inf')

def dfs(x, y, count):
    global min

    if x<0 or y<0 or (((x+1)*(y+1))>N):
        return

    if (x+1)*(y+1)==N:
        
        if min > count:
            min = count
            return
        return

    dfs(x+1, y, count+1)
    dfs(x, y+1, count+1)

    return

dfs(0,0,0)

print(min)

### FIXED CODE ###

N = int(input())

min = float('inf')

times = int(N**0.5)

for i in range(1, times+1, 1):

    if N%i==0:
        j = N//i
    else:
        continue
    temp = i+j-2
    if min > temp:
        min = temp

print(min)
import sys
sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

n,w = MI()
item = []
for i in range(n):
	item.append(LI())

def main():
 	dp = [0]*(w+1)
	for i in range(n):
		for j in range(w,item[i][0]-1,-1):
			dp[j] = max(dp[j], dp[j-item[i][0]]+item[i][1])
	print(dp[w])

if __name__ == '__main__':
	main()

### FIXED CODE ###

def solver():
	N,W = map(int, input().split())
	item = []
	for i in range(N):
		item.append(list(map(int, input().split())))
	dp = [0 for _ in range(W+1)]
 
	for i in range(0,N):
		for j in range(W, item[i][0]-1, -1):
			dp[j] = max(dp[j], dp[j-item[i][0]]+item[i][1])
	print(dp[W])
 
solver()
n = int(input())
z = []
y = o
for i in range(n):
  line = input().split(" ")
  if int(line[0])==int(line[1]):
    z.append(i)

for i in range(n-3):
  if z[i]==z[i+1]:
    if z[i+1]==z[i+2]:
      y += 1
if y > 0:
  print("yes")
else:
  print("no")


### FIXED CODE ###

n = int(input())
z = []
y = 0
for i in range(n):
  line = input().split(" ")
  if int(line[0])==int(line[1]):
    z.append(i)

for i in range(len(z)-2):
  if z[i]==z[i+1]-1:
    if z[i+1]==z[i+2]-1:
      y += 1
if y > 0:
  print("Yes")
else:
  print("No")
import math

A, B = [int(n) for n in input().split()]

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


### FIXED CODE ###

import fractions

A, B = [int(n) for n in input().split()]

print(A * B // fractions.gcd(A, B))
import fractions
n=int(input())
lists=[]
for s in range(n):
    s=int(input())
    lists.append(s)
lists.append(1)
glm=lists[0]
cnt=0
while cnt<n:
    gcd=fractions.gcd(glm,lists[cnt+1])
    glm=int(glm*lists[cnt+1]/gcd)
    cnt+=1    
print(glm)

### FIXED CODE ###

#早くmathを導入してほしい
from fractions import gcd
n=int(input())
glm=1
for i in range(n):
    nums=int(input())
    glm=int(glm*nums//gcd(nums,glm))
print(glm)
h, w = map(int, input().split())
a = [list(str(input())) for _ in range(h)]
for i in range(2):
    print(''.join(a[i]))
    print(''.join(a[i]))

### FIXED CODE ###

h, w = map(int, input().split())
a = [list(str(input())) for _ in range(h)]
for i in range(h):
    print(''.join(a[i]))
    print(''.join(a[i]))
N, M = map(int, input().split(' '))
lis1 = map(int, input().split(' '))
S = sum(lis1)
thresh = S / (4 * M)
lis2 = sorted(lis1)
if lis2[-M] < thresh:
  print('No')
else:
  print('Yes')

### FIXED CODE ###

N, M = map(int, input().split(' '))
lis1 = list(map(int, input().split(' ')))
S = sum(lis1)
thresh = S / (4 * M)
lis2 = sorted(lis1)
if lis2[-M] < thresh:
  print('No')
else:
  print('Yes')
from collections import deque
 
N,M = map(int,input().split())
hint_list = [list(map(int,input().split())) for i in range(M)]

r = [-1] * N

def find(a):
    if r[a] < 0:
        return a
    else:
        if r[r[a]] < 0:
            return r[a]
        else:
            r[a] =r[r[a]]
            return r[a]
    
def union(a,b):
    a -= 1
    b -= 1
    ar = find(a)
    br = find(b)
    if ar == br:
        return
    else:
        if r[ar] > r[br]:
            ar,br = br,ar
        r[ar] += r[br]
        r[br] = ar
        return
        
for i in range(len(hint_list)):
    union(hint_list[i][0],hint_list[i][1])
    print(r)
    
print(-min(r))

### FIXED CODE ###

from collections import deque
 
N,M = map(int,input().split())
hint_list = [list(map(int,input().split())) for i in range(M)]

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x -= 1
        y -= 1
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

uf = UnionFind(N)
for i in range(len(hint_list)):
    uf.union(hint_list[i][0],hint_list[i][1])
    
print(-min(uf.parents))
import math
from functools import reduce
N, X = map(int, input().slpit())
x = list(map(int,input().split()))
 
for i in range(N):
    x[i] = abs(x[i]-X)
 
x = sorted(x)[::-1]
cnt = 0
 
for i in range(N):
    cnt = math.gcd(cnt, x[i])
 
print(cnt)

### FIXED CODE ###

import math
from functools import reduce
N, X = map(int, input().split())
x = list(map(int,input().split()))
 
for i in range(N):
    x[i] = abs(x[i]-X)
 
x = sorted(x)[::-1]
cnt = 0
 
for i in range(N):
    cnt = math.gcd(cnt, x[i])
 
print(cnt)
n,q=map(int,input().split())
l=[[] for i in range(n)]
for i in range(n-1):
  a,b=map(int,input().split())
  l[a-1].append(b-1)
ans=[0 for i in range(n)]
for i in range(q):
  p,x=map(int,input().split())
  ans[p-1]+=x
def dsf(index,num):
  ans[index]+=num
  if len(l)-1<index:return
  for i in l[index]:
    dsf(i,ans[index])
dsf(0,0)
print(' '.join(str(j) for j in ans))

### FIXED CODE ###

import sys
sys.setrecursionlimit(500000)
input = sys.stdin.readline
n,q=map(int,input().split())
l=[[] for i in range(n)]
for i in range(n-1):
  a,b=map(int,input().split())
  l[a-1].append(b-1)
  l[b-1].append(a-1)
px=[0]*n
for i in range(q):
  p,x=map(int,input().split())
  px[p-1]+=x
ans=[0]*n
def dsf(index,u):
  ans[index]=ans[u]+px[index]
  for i in l[index]:
    if i==u:continue
    dsf(i,index)
dsf(0,-1)
print(*ans)
a=input()
print(24+a)

### FIXED CODE ###

a=int(input())
print(int(24+(24-a)))
A, B, C, K = map(int, input().split())
if K%2 = 0:
  print(A-B)
else:
  print(B-A)

### FIXED CODE ###

A, B, C, K = map(int, input().split())
if K%2 == 0:
  print(A-B)
else:
  print(B-A)
n, k = map(int,input().split())
inputarray = []
for i in range(n):
    inputarray.append([int(i) for i in input().split()])
t = [i[0] for i in inputarray]
d = [i[1] for i in inputarray]
def combinationListRecursive(data, r):
  if r == 0 or r > len(data):
    return []

  result = []
  _combinationListRecursive(data, r, 0, [], result)
  return result


def _combinationListRecursive(data, r, start, progress, result):
  if r == 0:
    result.append(progress)
    return

  for i in range(start, len(data)):
    _combinationListRecursive(data, r - 1, i + 1, progress + [data[i]], result)

result = combinationListRecursive(range(len(d)), k)
best = 0
for i in result:
    tarray = []
    dtmp = 0
    for k in range(k):
        dtmp += d[i[k]]
        tarray.append(t[i[k]])
    tlist = list(set(tarray))
    ttmp = len(tlist) ** 2
    if best < dtmp + ttmp:
        best = dtmp + ttmp
print(best)

### FIXED CODE ###

from heapq import heappush, heappop
N, K = map(int, input().split())
TD = [list(map(int, input().split())) for _ in range(N)]
TD.sort(key=lambda x:x[1], reverse=True)
muptiple = set()
hp = []
for t, d in TD:
    flg = 0
    if t not in muptiple:
        muptiple.add(t)
        flg = 1
    heappush(hp, (d*-1, flg))

ret = []
point = 0
vari = 0
total = 0
for i in range(K):
    v = heappop(hp)
    t = v[0]*-1
    vari += v[1]
    point += t
    if not v[1]:
        heappush(ret, t)

total = vari ** 2 + point

while len(hp) > 0 and len(ret) > 0:
    v = heappop(hp)
    if v[1] == 0:
        continue
    pre_t = heappop(ret)
    t = v[0]*-1
    point -= pre_t - t
    vari += 1
    tmp = vari ** 2 + point
    total = max(total, tmp)

print(total)
s1 = input()
s2 = input()

x, y, z = [int(i) for i in s1.split()]
l = [int(i) for i in s2.split()]
 
if x = 1:
  print(abs(z - l[x-1]))
else:
  if abs(z - l[x-1]) > abs(l[x-1] - l[x-2]):
    print(abs(z - l[x-1]))
  else:
    print(abs(l[x-1] - l[x-2]))

### FIXED CODE ###

s1 = input()
s2 = input()

x, y, z = [int(i) for i in s1.split()]
l = [int(i) for i in s2.split()]

if x == 1:
  print(abs(z - l[x-1]))
else:
  if abs(z - l[x-1]) > abs(l[x-1] - l[x-2]):
    print(abs(z - l[x-1]))
  else:
    print(abs(l[x-1] - l[x-2]))
N = int(input())
g = [ [] for i in range(N)]
for _ in range(N-1):
  a, b = map(int, input().split())
  g[b-1].append(a-1)
  g[a-1].append(b-1)
visit = [0]*N
e = []
a = [0]*N
b = [0]*N
def tansakuf(i):
  visit[i] = 1
  for j in g[i]:
    if visit[j] == 0:
      a[j] = a[i] + 1
      e.append(j)
  if len(e) != 0:
    f = e[0]
    e.pop(0)
    return tansakuf(f)
tansakuf(0)
def tansakus(i):
  visit[i] = 0
  for j in g[i]:
    if visit[j] == 1:
      b[j] = b[i] + 1
      e.append(j)
  if len(e) != 0:
    f = e[0]
    e.pop(0)
    return tansakus(f)
tansakus(N-1)
cnt = N
for i in range(N):
  if a[i] <= b[i]:
    cnt += 1
  else:
    cnt -= 1
if cnt > N:
  print('Fennec')
else:
  print('Snuke')

### FIXED CODE ###

from collections import deque
N = int(input())
g = [[] for i in range(N)]
for _ in range(N-1):
  a, b = map(int, input().split())
  g[b-1].append(a-1)
  g[a-1].append(b-1)
a = [-1]*N
b = [-1]*N
def bfs(n):
  q=deque()
  q.append(n)
  a[n] = 0
  while len(q):
    x=q.popleft()
    for i in g[x]:
      if a[i]==-1: 
        a[i]=a[x]+1
        q.append(i)
bfs(0)
def bfs2(n):
  q=deque()
  q.append(n)
  b[n] = 0
  while len(q):
    x=q.popleft()
    for i in g[x]:
      if b[i]==-1: 
        b[i]=b[x]+1
        q.append(i)
bfs2(N-1)
cnt = 0
for i in range(N):
  if a[i] <= b[i]:
    cnt += 1
  else:
    cnt -= 1
if cnt > 0:
  print('Fennec')
else:
  print('Snuke')
S = input()
T = input()
ans = 'No'
for i in range(len(S)):
    S = S[-1] + S
    S = S.rstrip(S[-1])
    if S == T:
        ans = 'Yes'
print(ans)


### FIXED CODE ###

S = input()
T = input()
ans = 'No'
if S == T:
    ans = 'Yes'
for i in range(len(S)):
    S = S[-1] + S
    S = S[:-1]
    if S == T:
        ans = 'Yes'
print(ans)
n = int(input())
list_a = list(map(int, input().split()))
num_rank = [0 for _ in range(9)]
for one_a in list_a:
  temp_rank = one_a // 400
  num_rank[temp_rank] += 1
if len([i for i in num_rank[:-1] if i > 0]) > 0:
  min_color = len([i for i in num_rank[:-1] if i > 0])
else:
  min_color = 1
max_color = len([i for i in num_rank[:-1] if i > 0]) + num_rank[-1]
print("{} {}".format(min_color, max_color))

### FIXED CODE ###

n = int(input())
list_a = list(map(int, input().split()))
num_rank = [0 for _ in range(9)]
for one_a in list_a:
  temp_rank = one_a // 400
  if temp_rank > 8:
    temp_rank = 8
  num_rank[temp_rank] += 1
if len([i for i in num_rank[:-1] if i > 0]) > 0:
  min_color = len([i for i in num_rank[:-1] if i > 0])
else:
  min_color = 1
max_color = len([i for i in num_rank[:-1] if i > 0]) + num_rank[-1]
print("{} {}".format(min_color, max_color))
i = list(map(int, input().split()))
if ((i[0] >= 1 and i[0] <= 9) and (i[1] >= 1 and i[1] <= 9)):
    print (i[0] * i[1])
else:
    print -1

### FIXED CODE ###

i = list(map(int, input().split()))
if ((i[0] >= 1 and i[0] <= 9) and (i[1] >= 1 and i[1] <= 9)):
    print (i[0] * i[1])
else:
    print (-1)
import string
import sys

w = raw_input()
for c in string.ascii_lowercase:
    if w.count(c) % 2 == 1:
        print("No")
        sys.exit()
print("Yes")


### FIXED CODE ###

import collections

for v in collections.Counter(input()).values():
    if v % 2 != 0:
        print("No")
        break
else:
    print("Yes")
def i():
    return int(input())
def i2():
    return map(int,input().split())
def s():
    return str(input())
def l():
    return list(input())
def intl():
    return list(int(k) for k in input().split())

n,m=i2()
h=intl()
cnt=0
score=0
l=[[] for i in range(n)]
for j in range(m):
	a,b=i2()
	l[a-1].append(b-1)
	l[b-1].append(a-1)
for j in range(n):
	for k in l[j]:
		if h[j]>k:
			cnt+=1
			if cnt==len(l[j]):
				score+=1
	cnt=0
for i in range(m):
	if len(l[i])==0:
		score+=1
print(score)


### FIXED CODE ###

def i():
    return int(input())
def i2():
    return map(int,input().split())
def s():
    return str(input())
def l():
    return list(input())
def intl():
    return list(int(k) for k in input().split())

n,m=i2()
h=intl()
cnt=0
score=0
l=[[] for i in range(n)]
for j in range(m):
	a,b=i2()
	l[a-1].append(b-1)
	l[b-1].append(a-1)
for j in range(n):
	for k in l[j]:
		if h[j]>h[k]:
			cnt+=1
			if cnt==len(l[j]):
				score+=1
	cnt=0
for i in range(n):
	if len(l[i])==0:
		score+=1
print(score)
def sigma(n):
    return sum([i for i in range(n+1)])

def main():
    N, K = map(int, input().split(' '))
    p = list(map(int, input().split(' ')))

    max_value = 0
    for i in range(N-K+1):
        sum_ = sum(p[i:i+K-1])
        if sum_ > max_value:
            max_value = sum_
            max_list = p[i:i+K]

    expected = 0
    for v in max_list:
        expected += sigma(v) / v

    print(expected)

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    N, K = map(int, input().split())
    p = list(map(int, input().split()))

    p = [(p_i+1)/2 for p_i in p]
    ans = 0
    for i in range(N-K+1):
        if i == 0:
            sum_ = sum(p[i:i+K])
        else:
            sum_ = sum_ + p[i+K-1] - p[i-1]
        ans = max(ans, sum_)

    print(ans)

if __name__ == '__main__':
    main()
n = int(input())
A = [int(_) for _ in input().split()]

# dp = [[0 for i in range((n//2)+1)] for j in range(n)]

dp = [[0, 0] for j in range(n)]
M = - float('inf')
for i in range(4):
    M = max(M, A[i])
    dp[i][0] = M
dp[2][1] = dp[0][0] + A[2]
dp[3][1] = max(dp[1][0] + A[3], dp[2][1])


# for i in range(len(dp)):
#     print(dp[i])

# for i in range(4, n):
#     for j in range(max(0, i // 2 - 1), (i + 2) // 2):
#         # print(i, j)
#         if i % 2 == 0 and j == (i + 2) // 2 - 1 :
#             dp[i][j] = dp[i-2][j-1] + A[i]
#         else:
            # dp[i][j] = max(dp[i-2][j-1] + A[i], dp[i-1][j])

for i in range(4, n):
    for j in range(2):
        # print(i, j)
        if i % 2 == 0 and j == 1:
            dp[i][j] = dp[i-2][1] + A[i]
        elif i % 2 == 0 and j == 0:
            dp[i][j] = max(dp[i-2][0] + A[i], dp[i-1][1])
        elif i % 2 == 1 and j == 1:
            dp[i][j] = max(dp[i-2][1] + A[i], dp[i-1][1])
        else:
            dp[i][j] = max(dp[i-2][0] + A[i], dp[i-1][0])

# for i in range(len(dp)):
#     print(dp[i])

print(dp[n-1][(n+1)%2])

### FIXED CODE ###

import sys

n = int(input())
A = [int(_) for _ in input().split()]

# dp = [[0 for i in range((n//2)+1)] for j in range(n)]

if n == 1 or n == 2 or n == 3:
    print(max(A))
    sys.exit()

dp = [[0, 0] for j in range(n)]
M = - float('inf')
for i in range(4):
    M = max(M, A[i])
    dp[i][0] = M
dp[2][1] = dp[0][0] + A[2]
dp[3][1] = max(dp[1][0] + A[3], dp[2][1])


# for i in range(len(dp)):
#     print(dp[i])

# for i in range(4, n):
#     for j in range(max(0, i // 2 - 1), (i + 2) // 2):
#         # print(i, j)
#         if i % 2 == 0 and j == (i + 2) // 2 - 1 :
#             dp[i][j] = dp[i-2][j-1] + A[i]
#         else:
            # dp[i][j] = max(dp[i-2][j-1] + A[i], dp[i-1][j])

for i in range(4, n):
    for j in range(2):
        # print(i, j)
        if i % 2 == 0 and j == 1:
            dp[i][j] = dp[i-2][1] + A[i]
        elif i % 2 == 0 and j == 0:
            dp[i][j] = max(dp[i-2][0] + A[i], dp[i-1][1])
        elif i % 2 == 1 and j == 1:
            dp[i][j] = max(dp[i-2][1] + A[i], dp[i-1][1])
        else:
            dp[i][j] = max(dp[i-2][0] + A[i], dp[i-1][0])

# for i in range(len(dp)):
#     print(dp[i])

print(dp[n-1][(n+1)%2])
inp = []
tmp = 9
ans = 0
for _ in range(5):
    inp.append(input())
for i in range(5):
    if tmp > int(inp[i][-1]) and int(inp[i][-1]) != 0:
        tmp = int(inp[i][-1])
        temp = i
last = inp.pop(temp)
for j in inp:
    if j[-1] == "0":
        ans += int(j)
    else:
        ans += int(j[:-1]+ "0") + 10
ans += int(last)
print(ans)


### FIXED CODE ###

inp = []
tmp = 10
ans = 0
temp = 0
for _ in range(5):
    inp.append(input())
for i in range(5):
    if tmp > int(inp[i][-1]) and int(inp[i][-1]) != 0:
        tmp = int(inp[i][-1])
        temp = i
last = inp.pop(temp)
for j in inp:
    if j[-1] == "0":
        ans += int(j)
    else:
        ans += int(j[:-1]+ "0") + 10
ans += int(last)
print(ans)
H,N=map(int,input().split())

A=[]
B=[]
DP=[10000000000]*(H+1)
DP[0]=0
for i in range(N):
    a,b=map(int,input().split())
    A.append(a)
    B.append(b)
    DP[a]=b



minA=A[A.index(min(A))]
minB=B[B.index(min(B))]

for i in range(1,A.index(min(A))):
    DP[i]=minB

for i in range(A.index(min(A)),H+1):
    temp=[]
    for j in range(i//2+1):
        temp.append(DP[j]+DP[i-j])
    DP[i]=min(temp)

print(DP[H])


### FIXED CODE ###

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

A=[]
B=[]

for i in range(N):
    a,b=map(int,input().split())
    A.append(a)
    B.append(b)

DP=[[1000000000]*(H+max(A)+1) for i in range(N+1)]


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


for i in range(N):
    for h in range(H+max(A)+1):
        DP[i+1][h]=min(DP[i+1][h],DP[i][h])
        if h-A[i]>=0:
            DP[i+1][h]=min(DP[i+1][h-A[i]]+B[i],DP[i+1][h])

print(min(DP[N][H:]))
H, W = list(map(int, input().split()))
S = np.array([list(input().rstrip()) for _ in range(H)]) == '.'
U = np.zeros((H, W), dtype=int)
D = np.zeros((H, W), dtype=int)
R = np.zeros((H, W), dtype=int)
L = np.zeros((H, W), dtype=int)
for h in range(1, H):
    U[h] = (U[h - 1] + 1) * S[h - 1]
for h in reversed(range(H - 1)):
    D[h] = (D[h + 1] + 1) * S[h + 1]
for w in range(1, W):
    L[:, w] = (L[:, w - 1] + 1) * S[:, w - 1]
for w in reversed(range(W - 1)):
    R[:, w] = (R[:, w + 1] + 1) * S[:, w + 1]
print(max((U+D+L+R) * S) + 1)

### FIXED CODE ###

import numpy as np
H , W = list(map(int, input().split()))
S = np.array([list(input().rstrip()) for _ in range(H)]) == '.'
U = np.zeros((H, W), dtype=int)
D = np.zeros((H, W), dtype=int)
R = np.zeros((H, W), dtype=int)
L = np.zeros((H, W), dtype=int)
for h in range(1, H):
    U[h] = (U[h - 1] + 1) * S[h - 1]
for h in reversed(range(H - 1)):
    D[h] = (D[h + 1] + 1) * S[h + 1]
for w in range(1, W):
    L[:, w] = (L[:, w - 1] + 1) * S[:, w - 1]
for w in reversed(range(W - 1)):
    R[:, w] = (R[:, w + 1] + 1) * S[:, w + 1]
print(np.max((U+D+L+R) * S) + 1)
A = int(input())
B = int(input())
 
print(max(A+B,A-B,A*B))

### FIXED CODE ###

A,B = list(map(int,input().split()))
 
print(max(A+B,A-B,A*B))
n, m = map(int, input().split())

a = []
for i in range(n):
   a.append(input())

b = []
for i in range(m):
   b.append(input())

def func(base, target):
       for i in range(n-m+1):
        check = base[i:i+m]
        for j in range(n-m+1):
            check2 = [line[j:j+m] for line in check]
            if check2 == target:
                return print('Yes')
    return print('No')

func(a,b)


### FIXED CODE ###

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

a = []
for i in range(n):
   a.append(input())

b = []
for i in range(m):
   b.append(input())

def func(base, target):
   for i in range(n-m+1):
      check = base[i:i+m]
      for j in range(n-m+1):
         check2 = [line[j:j+m] for line in check]
         if check2 == target:
            return print('Yes')
   return print('No')

func(a,b)
#include <iostream>
#include <string>


using namespace std;


bool yaki_check(string s)
{
  if (s.length() < 4){
    return false;
  }
  string t("YAKI");
  for (int i=0; i<4; i++){
    if (s[i] != t[i]){
      return false;
    }
  }
  return true;
}

int main()
{
  string s;

  cin >> s;

  if (yaki_check(s)){
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  
  return 0;
}


### FIXED CODE ###

def main():
    s = input()
    if len(s) < 4 or "YAKI" != s[:4]:
        print("No")
    else:
        print("Yes")


if __name__ == "__main__":
    main()
=int(input())
c=[]
a=[]
b=[]
for i in range(n):
	x,y=map(int,input().split())
	a.append(x)
	b.append(y)
	c.append([x-y,i])
c.sort()
c.reverse()
q=[]
qq=[]
for i in range(n):
	if i%2==0:
		q.append(c[i][1])
	else:
		qq.append(c[i][1])
ans=0
for i in range(len(q)):
	ans+=a[q[i]]
for i in range(len(qq)):
	ans-=b[qq[i]]
print(ans)
	

### FIXED CODE ###

n=int(input())
ans=0
c=[]
for i in range(n):
	x,y=map(int,input().split())
	ans+=x
	c.append(x+y)
c.sort()
c.reverse()
for i in range(n):
	if i%2!=0:
		ans-=c[i]
print(ans)
# coding:utf8

N = input()
A = input().split()

s = 0
for i in range(N):
    s += 1.0/int(A[i])
s = 1.0/s

print(s)

### FIXED CODE ###

# coding:utf-8
 
num = int(input())
chr = input()
 
if num>=3200:
  print(chr)
else:
  print("red")