Harryxun/stf_run huggingface dataset:
A=list(input())
B=list(input())
minm=min(A)
maxi=max(B)

while min(len(A),len(B))!=0:
 if minm<maxi:
  print("Yes")
  break
 if minm==maxi:
  A.remove(minm)
  B.remove(maxi)
 if minm>maxi:
  print("No") 
  break
 if min(len(A),len(B))==0:
  print("No")
  break

### FIXED CODE ###

A=input()
B=A.split(" ")
a=int(B[0])
b=int(B[1])
c=a+b
avg=c/2
iavg=int(c/2)
if avg==iavg:
 print(iavg)
else:
 import math
 print(math.floor(avg)+1)
n=int(input())
s=input()
a=[1]
for i in range(1,n+1):
	if s[i]=="I":
		a.append(a[i-1]+1)
	else:
		a.append(a[i-1]-1)
print(max(a))

### FIXED CODE ###

n=int(input())
s=input()
a=[0]
for i in range(1,n+1):
	if s[i-1]=="I":
		a.append(a[i-1]+1)
	else:
		a.append(a[i-1]-1)
print(max(a))
a,b,c = input().split()

if a<b<c:
  print 'yes'
else:
  print 'no'

### FIXED CODE ###

a,b,c = map(int,raw_input().split())

if a<b and b<c:
  print 'Yes'
else:
  print 'No'
S = input()
li = [i for i in S]
li_2 = list(set(li))
li_2.sort()
ascii_lowercase = "abcdefghijklmnopqrstuvwxyz"
ascii_lowercase_list = list(ascii_lowercase)
for k in range(0,len(S),1):
  if li_2[k] != ascii_lowercase_list[k]:
    print(ascii_lowercase_list[k])
    break
  elif li_2 == ascii_lowercase_list:
    print("None")
    break

### FIXED CODE ###

S = list(set(input()))
S.sort()
tmp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,len(tmp),1):
    if tmp[i] not in S:
        print(tmp[i])
        exit()
print("None")
X=int(input())
Y=int(X**(0.2))
for i in range(Y,-Y,-1):
    for t in (-Y,Y,1):
        if i**5-t**5==X:
            S=i
            Z=t
            break
print(S,Z)

### FIXED CODE ###

X=int(input())
l=[]
for i in range(300):
    a=i**5
    l.append(a)
    l.append(-a)
for j in l:
    for s in l:
        if j-s==X and j!=s:
            ans=[]
            for i in [j,s]:
                aaa=abs(i)**(1/5)
                if i>=0:
                    ans.append(int(aaa))
                else:
                    ans.append(int(-aaa))
            print(*ans)
            exit()
p=lambda x:print(x,end=' ')
n=input():p(n+':')
n=int(n);s=n**.5
while n%2==0 and n>3:p(2);n//=2
d=3
while s>d and n>d:
 if n%d==0:p(d);n//=d
 else:d+=2
print(n)


### FIXED CODE ###

p=lambda x:print(x,end=' ')
n=input();p(n+':')
m=n=int(n)
while n%2==0 and n>3:p(2);n//=2
d=3
while d*d<m and n>d:
 if n%d>0:d+=2
 else:p(d);n//=d
print(n)
A,B=input().sprit(" ")
A,B=int(A),int(B)

K=A+B
if K%2==0:
  print(K/2)
else:
  print("IMPOSSIBLE")

### FIXED CODE ###

A,B=input().split(" ")
A,B=int(A),int(B)

K=A+B
if K%2==0:
  print(int(K/2))
else:
  print("IMPOSSIBLE")
import sys
n = list(sys.stdin.readlines().join().lower())
charac = []
for j in range(97,97+26):
    m= 0
    for i in range(0,len(n)):
        if ord(n[i]) == j:
            m += 1
    charac.append("{} : {}".format(chr(j),m))

for i in range(0,26):
    print(charac[i])

### FIXED CODE ###

s =""
while True:
    try:
        s += input().lower()
    except:
        break
    
s = list(map(ord,list(s)))
for i in range(ord("a"),ord("z")+1):
    print(chr(i) + " : " + str(s.count(i)))
import sys
import random
n = int(input())
h = list(map(int,input().split()))

mx = h[0]
for i in range(1, n):
        
        if mx > h[i]+1:
                print('NO')
                break
        mx = max(mx,h[i+1])
print('Yes')

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
 
mx = a[0]
for i in range(1, n):
    if mx-a[i]>1:
        print("No")
        break
    mx = max(mx, a[i])
else: print("Yes")
S = list(map(str, input().split()))
if S == S.soreted():
    print("<")
else:
    print(">")

### FIXED CODE ###

S = list(map(str, input().split()))
if S[0] == S[1]:
    print("=")
    exit()
if S == sorted(S):
    print("<")
else:
    print(">")
N = input()
H = input()

N = int(N)
H = [int(x) for x in H.split(" ")]
C = 0
R = 0
m = min(H[0], H[1])

while C < (N-1):
    if H[C] - H[C+1] > 1:
        R = 1
        C = N
    elif H[C] - H[C+1] == 1:
        if m > (H[C]-1):
            R = 1
            C = N
        else:
            m = min(m, H[C]-1)
            C += 1
    else:
        C+=1

if R == 0:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

IN = input()
A, B, C = [int(x) for x in IN.split(" ")]
total = 0
try:
    total = C - min((A-B), C)
    print(total)
except:
    print("ERROR")
import sys
import math
import itertools

n, m = map(int, input().split())
h = list(map(int, input().split()))
ans = [True] * n
lis = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    lis[a - 1] = max(lis[a - 1], h[b - 1])
    lis[b - 1] = max(lis[b - 1], h[a - 1])
ans = 0
if lis[i] > h [i]:
    ans += 1
print(ans)


### FIXED CODE ###

import sys
import math

n, m = map(int, input().split())
h = list(map(int, input().split()))
ma = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    ma[a - 1] = max(ma[a-1],h[b - 1])
    ma[b - 1] = max(ma[b-1] ,h[a - 1])
cnt = 0
for i in range(n):
    if h[i] > ma[i]:
        cnt += 1
print(cnt)
N=int(input())
a=map(int,input().split())

num=[0,0,0,0,0,0,0,0,0]
counter=0

for i in a:
    if 1<=i and i<=399:
        num[0]+=1
    elif 400 <= i and i <= 799:
        num[1] += 1
    elif 800 <= i and i <= 1199:
        num[2] += 1
    elif 1200 <= i and i <= 1599:
        num[3] += 1
    elif 1600 <= i and i <= 1999:
        num[4] += 1
    elif 2000 <= i and i <= 2399:
        num[5] += 1
    elif 2400 <= i and i <= 2799:
        num[6] += 1
    elif 2800 <= i and i <= 3199:
        num[7] += 1
    elif 3200 <= i:
        num[8] += 1

for i in range(0,8):
    if num[i]!=0:
        counter+=1

if counter==0 and num[8]==0:
    min=0
    max=0

elif counter==0 and num[8]!=0:
    min=1
    max=num[8]

else:
    min=counter
    max=counter+num[8]

#print(num)
print(str(min)+" "+str(max))


### FIXED CODE ###

r,g,b=map(int,input().split())

s=100*r+10*g+b
if s%4==0:
    print("YES")
else:
    print("NO")
n = int(input())
t, x, y = 0, 0, 0 # current, default(0, 0, 0)
ans = "Yes"
for i in range(1, n+1):
  ti, xi, yi = map(int, input().split())
  dist = abs((xi - x) + (yi - y))
  dt = ti - t
  if dt >= dist and (dt - dist) % 2 == 0:
    t, x, y = ti, xi, yi  # update
  else:
    ans = "No"
    break
 
print(ans)

### FIXED CODE ###

a, b = map(int, input().split())

if a * b % 2 == 0:
  print("Even")
else:
  print("Odd")
h,w=map(int,input().split())
A=[list(input()) for i in range(w)]
answ=[]
ansh=[]
for i in range(w):
  if not all([a=="." for a in A[i]]):
    answ.append(i)
for j in range(h):
  if not all([A[i][j]=="." for i in range(w)]):
    ansh.append(j)
for i in answ:
  for j in ansh:
    print(A[i][j],end="")
  print("\n")
    

### FIXED CODE ###

h,w=map(int,input().split())
A=[list(input()) for i in range(h)]
answ=[]
ansh=[]
for i in range(h):
  if not all([a=="." for a in A[i]]):
    answ.append(i)
for j in range(w):
  if not all([A[i][j]=="." for i in range(h)]):
    ansh.append(j)
for i in answ:
  for j in ansh:
    print(A[i][j],end="")
  print("\n")
N, A, B = map(int, input()split()) 
if B >= A*N:
  print(A*N)
else:
  print(B)

### FIXED CODE ###

N, A, B = map(int, input().split()) 
if B >= A*N:
  print(A*N)
else:
  print(B)
#n = int(input())
a,b,c = map(int,input().spkit())

if (a==b and b == c):
    print(1)
elif (a==b or b == c or a == c):
    print(2)

else:
    print(3)



### FIXED CODE ###

#n = int(input())
a,b,c = map(int,input().split())

if (a==b and b == c):
    print(1)
elif (a==b or b == c or a == c):
    print(2)

else:
    print(3)
N, Q = map(int, input().split())

ab_list = [list(map(int,list(input().split()))) for _ in range(N-1)]  
px_list = [list(map(int,list(input().split()))) for _ in range(Q)]  

graph = [[] for _ in range(N+1)]
point_list = [0] * (N+1)

for a, b in ab_list:
    graph[a].append(b)
    graph[b].append(a)
    
for p, x in px_list:
    point_list[p] += x
    
def add_point(num, root, point):
    point_list[num] += point
    for i in graph[num]:
        if i == root:
            continue
        add_point(i, num, point_list[num])

add_point(1, 0, 0)
 
print(*(point_list[1:]))

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)

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

ab_list = [[] for _ in range(N)]

for _ in range(N-1):
    a, b = map(int, input().split())
    ab_list[a-1].append(b-1)
    ab_list[b-1].append(a-1)
    
px_list = [list(map(int,input().split())) for _ in range(Q)]
ans = [0] * N

for q, x in px_list:
    ans[q-1] += x

def add_point(num, root=-1):
    for c in ab_list[num]:
        if root == c:
            continue
        ans[c] += ans[num]
        add_point(c, num)
        
add_point(0, -1)

print(*ans)
#70

N = list(int(input()))

if N[0] == N[2]:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

#70

N = list(input())

if N[0] == N[2]:
    print("Yes")
else:
    print("No")
import collections
S = list(map(int, list(input())))
N = len(S)

dp = [0]*N
if N < 4:
    print(0)
    exit(0)

ans = 0

D = [0]*2019
D[0] = 1
for i in range(1, N):
    D[i] = D[i-1]*10 % 2019
t = collections.defaultdict(int)
tmp = 0
t[0] += 1
for i in range(N):
    tmp += S[N-1-i]*D[i]
    tmp %= 2019
    t[tmp] += 1

for x in t:
    ans += t[x]*(t[x]-1) // 2

# print(N)
# print(*dp, sep='\n')

print(ans)


### FIXED CODE ###

import collections
S = list(map(int, list(input())))
N = len(S)

dp = [0]*N
if N < 4:
    print(0)
    exit(0)

ans = 0

D = [0]*N
D[0] = 1
for i in range(1, N):
    D[i] = D[i-1]*10 % 2019
t = collections.defaultdict(int)
tmp = 0

t[0] += 1
for i in range(N):
    tmp += S[N-1-i]*D[i]
    tmp %= 2019
    t[tmp] += 1

for x in t:
    ans += t[x]*(t[x]-1) // 2

# print(N)
# print(*dp, sep='\n')

print(ans)
import sys

X,N = map(int,input().split())
P = list(map(int,input().split()))
if X < 1 or 100 < X:
    sys.exit()
if N < 0 or 100 < N:
    sys.exit()
if N == 0:
    print(X)
    sys.exit()

P_number = len(P)
if P_number < 1 or 100 < P_number:
    sys.exit()

res1 = 100
res2 = 100
res0 = 0
i = 0
while i < N:
    if !((X - i) in P):
        res1 = (X - i)
    i += 1
while j < N:
    if !((X + j) in P):
        res2 = (X + j)
    j += 1
if res2 > res1:
    res0 = res1
else if res1 > res2:
    res0 = res2
else if res2 == res1:
    res0 = res1
print(res0)


### FIXED CODE ###

import sys

X,N = map(int,input().split())
P = list(map(int,input().split()))
if X < 1 or 100 < X:
    sys.exit()
if N < 0 or 100 < N:
    sys.exit()
if N == 0:
    print(X)
    sys.exit()

P_number = len(P)
if P_number < 1 or 100 < P_number:
    sys.exit()

res1 = 100
res2 = 100
res0 = 0
i = 0
j = 0
while i <= N:
    if (X - i) not in P:
        res1 = (X - i)
        break
    i += 1
while j <= N:
    if (X + j) not in P:
        res2 = (X + j)
        break
    j += 1
if i > j:
    res0 = res2
elif j > i:
    res0 = res1
elif i == j:
    res0 = res1
print(res0)
print(a)
n = int(input())
t = list(map(int,input().split()))
m = int(input())

for i in range(m):
    lst = list(t)
    p,x = map(int,input().split())
    lst[p-1] = x
    print(sum(lst))

### FIXED CODE ###

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

for i in range(m):
    lst = list(t)
    p,x = map(int,input().split())
    lst[p-1] = x
    print(sum(lst))
MAX = 100
INFTY = 1 << 21
WHITE = 0
GRAY = 1
BLACK = 2
d = [INFTY for i in range(n)]
p = [-1 for i in range(n)]
color = [WHITE for i in range(n)]
d[0] = 0

n = int(input())
M = [[map(int, input().split()) for i in range(n)] for j in range(n)]
for i in range(n):
    for j in range(n):
        if (M[i][j] == -1):
            M[i][j] = INFTY

def prim():
    global M, d, p, color
    while(1):
        minv = INFTY
        u = -1
        for i in range(n):
            if (minv > d[i] and color[i] != BLACK):
                u = i
                minv = d[i]
        if (u == -1):
            break
        color[u] = BLACK
        for v in range(n):
            if (color[v] != BLACK and M[u][v] != INFTY):
                if (d[v] > M[u][v]):
                    d[v] = M[u][v]
                    p[v] = u
                    color[v] = GRAY
    
    _sum([M[i][p[i]] for i in range(n) if (p[i] != -1)])

print(prim())

### FIXED CODE ###

INFTY = 1 << 21
WHITE = 0
GRAY = 1
BLACK = 2

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

d = [INFTY for i in range(n)]
p = [-1 for i in range(n)]
color = [WHITE for i in range(n)]

for i in range(n):
    for j in range(n):
        if (M[i][j] == -1):
            M[i][j] = INFTY

def prim():
    global M, d, p, color
    d[0] = 0
    while(1):
        minv = INFTY
        u = -1
        for i in range(n):
            if (minv > d[i] and color[i] != BLACK):
                u = i
                minv = d[i]
        if (u == -1):
            break
        color[u] = BLACK
        for v in range(n):
            if (color[v] != BLACK and M[u][v] != INFTY):
                if (d[v] > M[u][v]):
                    d[v] = M[u][v]
                    p[v] = u
                    color[v] = GRAY
    
    return sum([M[i][p[i]] for i in range(n) if p[i] != -1])

print(prim())
n = int(input())
work = [list(map(int,input().split())) for _ in range(n)]
work = sorted(work,key = lambda x:x[1])
a = [0] * n
a[0] = work[0][0]
for i in range(1,N):
    a[i] = a[i-1] + work[i][0]
ans = 'Yes'
for j in range(N):
    if a[j] > work[j][1]:
        ans = 'No'
        break
print(ans)

### FIXED CODE ###

n = int(input())
work = [list(map(int,input().split())) for _ in range(n)]
work = sorted(work,key = lambda x:x[1])
a = [0] * n
a[0] = work[0][0]
for i in range(1,n):
    a[i] = a[i-1] + work[i][0]
ans = 'Yes'
for j in range(n):
    if a[j] > work[j][1]:
        ans = 'No'
        break
print(ans)
N, Q= input().split(" ")
S = input()
index_list_all = []
for i in range(int(Q)):
    lQ, rQ = input().split(" ")
    index_list_all.append([int(lQ), int(rQ)])

for index_list in index_list_all:
    print(len(S[index_list[0] - 1: index_list[1]].split("AC")) - 1)

### FIXED CODE ###

char = input()
if char == "A":
    char2 = "T"
elif char == "T":
    char2 = "A"
elif char == "G":
    char2 = "C"
elif char == "C":
    char2 = "G"
print(char2)
N = int(input()[:-1])

if N in [2,4,5,7,9]:
  print("hon")
elif N in [0,1,6,8]:
  print("pon")
else:
  print("bon")

### FIXED CODE ###

N = int(input()[-1])

if N in [2,4,5,7,9]:
  print("hon")
elif N in [0,1,6,8]:
  print("pon")
else:
  print("bon")
import sys
sys.setrecursionlimit(1500)
n=int(input())
arr=list(map(int,input().split()))
vis={}
vis[1]=0
if n < 2:
  print(0)
  exit
vis[2]=abs(arr[0]-arr[1])
if n == 2:
  print(vis[2])
  exit
def c(i):
  if i in vis:
    #print(vis)
    return vis[i]
  x = abs(arr[i-1]-arr[i-2]) + c(i-1)
  y = abs(arr[i-1]-arr[i-3]) + c(i-2)
  vis[i]=min(x, y)
  #print(i, x, y, vis)
  return vis[i]
c(n)
print(vis[n-1])

### FIXED CODE ###

n=int(input())
arr=list(map(int,input().split()))
if n < 2:
  print(0)
vis = [0] * n
vis[0] = 0
vis[1] = abs(arr[0]-arr[1])
for i in range(2, n):
    step_1 = abs(arr[i]-arr[i-1]) + vis[i-1]
    step_2 = abs(arr[i]-arr[i-2]) + vis[i-2]
    vis[i] = min(step_1, step_2)
print(vis[-1])
n,x=map(int,input().split())
burgar='p'
for i in range(n):
    burgar='b'+burgar+'p'+burgar+'b'
a=list(burgar)
ans=0
for j in a[:x]:
    if j=='p':
        ans+=1
print(ans)

### FIXED CODE ###

n,x=map(int,input().split())
len_b=2**(n+2)-3
p=[2**(i+1)-1 for i in range(n)]
start=1
end=len_b
center=(end+1)//2
count1=0
count2=n-1
while True:
    if count2==-1:
        count1+=1
        break
    elif x==start:
        break
    elif x==center:
        count1+=p[count2]+1
        break
    elif x==end:
        count1+=p[count2]*2+1
        break
    elif x<center:
        start=start+1
        end=center-1
        center=(start+end)//2
        count2-=1
    else:
        start=center+1
        end=end-1
        center=(start+end)//2
        count1+=p[count2]+1
        count2-=1
print(count1)
N, M = map(int, input().split())
A = list(map(int, input().split()))

for i in range(M):
    b, c = map(int, input().split())
    A.extend([c]*b)
A.sort(reverse=True)
ans = A[:N]
print(sum(ans))

### FIXED CODE ###

A, B = map(int, input().split())
if A >= 13:
    print(int(B))
elif A <= 12 and A >= 6:
    print(int(B / 2))
else:
    print(0)
T = int(input())
a = []
for i in range(T):
    a.append(list(map(int, input().split())))
for r in a:
    s, b, c, d = r[0], r[1], r[2], r[3]
    mod_list = []
    if (s < b) or (b>d):
        print('No')
        continue
    if (c>b):
        print('Yes')
        continue
    while True:
        s = s%b
        if s > c:
            print('No')
            break
        s += d
        if s in mod_list:
            print('Yes')
            break
        mod_list.append(s)

### FIXED CODE ###

N = map(int, input())
a = list(map(int, input().split()))
all_set = set(range(1, 10000))

use_set = list(set(all_set - set(a)))

count = 0
for i in range(len(a)-1):
    if a[i] == a[i+1]:
        a[i+1] = use_set[0]
        use_set = use_set[1:]
        count += 1
    
print(count)
ai = lambda: list(map(int,input().split()))
ai_ = lambda: [int(x)-1 for x in input().split()]

n = int(input())
a = ai()
if all(i == a[0] for i in a):
    print(n//2)
    exit()

a1 = a[::2]
a2 = a[1::2]

from collections import Counter
c1 = Counter(a1)
c2 = Counter(a2)
m1 = c1.most_common(2)
m2 = c2.most_common(2)
if m1[0][0] == m2[0][0]:
    if len(c1) == 1:
        print(n-m1[0][1]-m2[1][1])
    elif len(c2) == 1:
        print(n - m1[0][1] - m2[1][1])
    else:
        print(min(n-m1[0][1]-m2[1][1], n-m1[1][1]-m2[0][1]))
else:
    print(n-m1[0

### FIXED CODE ###

ai = lambda: list(map(int,input().split()))
ai_ = lambda: [int(x)-1 for x in input().split()]

n = int(input())
a = ai()
if all(i == a[0] for i in a):
    print(n//2)
    exit()

a1 = a[::2]
a2 = a[1::2]

from collections import Counter
c1 = Counter(a1)
c2 = Counter(a2)
m1 = c1.most_common(2)
m2 = c2.most_common(2)
if m1[0][0] == m2[0][0]:
    if len(c1) == 1:
        print(n-m1[0][1]-m2[1][1])
    elif len(c2) == 1:
        print(n - m1[0][1] - m2[1][1])
    else:
        print(min(n-m1[0][1]-m2[1][1], n-m1[1][1]-m2[0][1]))
else:
    print(n-m1[0][1] - m2[0][1])
num=list(map(int,input().split()))
nums=list(map(int, input().split()))
a=[0]*num[1]
max=-1
for i in nums:
    a.append((i+1)/2)
    a.pop(0)
    s=sum(a)
    if(s>max):
        max=s
print(max)

### FIXED CODE ###

items=input().split()
nums=list(map(int, input().split()))
target=input()
if(target==items[0]):
    print(nums[0]-1,nums[1])
else:
    print(nums[0],nums[1]-1)
MOD = 1e9 + 7
OO = False

def main():
	N, K = map(int, input().split())
	numbers = sorted(map(int, input().split()))
	if K==1:
		return 0
	if K==N:
		return numbers[0] - numbers[-1]


	global table
	table = calculate_table(N+1)
	for i in table:
		if OO: print(i)
	
	n, k = N-1, K-1
	total, x = 0, n
	while x >= k:
		res = search(numbers[n-x], x-1, k-1, numbers)
		if OO: print(f"x: {x} and res: {res}")
		total = (total + res)
		x -= 1

	return total

	
	


def search(minimum, n, k, numbers):
	total, x = 0, n
	while x >= k:
		total = (get_table(x, k) * (numbers[x-n-1]-minimum) + total)
		x -= 1
	
	if OO: print(f"min: {minimum} and n: {n} and k: {k} and total: {total}")
	return total


def calculate_table(n0):
	table = [[1], [1, 1]]

	for n in range(2, n0):
		table.append([1 if i==0 or i==n else table[n-1][i-1]+table[n-1][i] for i in range(n+1)])
	
	return table

def get_table(n, k):
	return table[n][k]
	
	

print(main())

### FIXED CODE ###

import time
MOD =  1000000007
MOD2 = 1000000005
MAX = 100001

facs = [1 for _ in range(MAX)]
inv = [1 for _ in range(MAX)]


for i in range(1, MAX):
	facs[i] = (facs[i-1] * i) % MOD

for i in range(1, MAX):
	inv[i] = pow(facs[i], MOD2, MOD)


def get_facs(x):
	return facs[x]


def get_inv(x):
	return inv[x]

def choose(n, k):

	if k==0 or n==k:
		return 1
	if n==0:
		return 0
	if k>n:
		return 0
	r = (get_facs(n)*get_inv(k)) % MOD
	r = (r*get_inv(n-k)) % MOD
	return r



def main():
	N, K = map(int, input().split())
	numbers = sorted(map(int, input().split()))
	if K==1:
		return 0
	if K==N:
		return abs(numbers[0] - numbers[-1])

	score = 0
	for i, x in enumerate(numbers):
		score += ((choose(i, K-1) - choose(N-1-i, K-1)) * x)

	return score%MOD
	
	
print(main())
n=int(input())
l=maplist((int,input().split()))
count=0
while True:
    if all(elem % 2==0 for elem in l):
        count+=1
        for i in range(n):
            l[i]=l[i]//2
    else:
        break
print(count)


### FIXED CODE ###

n=int(input())
l=list(map(int,input().split()))
count=0
while True:
    if all(elem % 2==0 for elem in l):
        count+=1
        for i in range(n):
            l[i]=l[i]//2
    else:
        break
print(count)
#prdさんから参照
N = int(input())
#これが唯一の事実データ
src = [tuple(map(int,input().split())) for i in range(N)]
 
INF = float('inf')
#ここ以降でかかれてあるcx,cyはあくまで頂上であると仮定しているだけで条件と合わない場合に不適切な座標となる。
for cx in range(0,101):
    for cy in range(0,101):
        tmph = None
        maxh = INF
        for x,y,h in src:
            if h > 0:
                tmp = h + abs(x-cx) + abs(y-cy)
                if tmph is None:
                    tmph = tmp
                else:
                    if tmp != tmph:
                        break
#                 if tmph > maxh:
#                     break
            else:
                #ここでmaxhがtmphよりも小さくなってしまった場合、hは0だから頂点からのxとyの差の和がtmphはなければならないのに、それを下回っているため
                #データx,yは絶対的な値なのでcx,cyが間違っていることになる。それを判定するのが上のtmph > maxh の時となり
                maxh = min(maxh, abs(x-cx) + abs(y-cy))
                #最低でも1つはピラミッド内の座標がないと解けないのでここはいらない？
#                 if maxh == 1:
#                     tmph = 1
                if tmph > maxh:
                    break
        else:
            for x,y,h in src:
                if max(tmph - abs(x-cx) - abs(y-cy), 0) != h:
                    break
            else:
                print(cx,cy,tmph)
                exit()

### FIXED CODE ###

#模範解答
N = int(input())
#これが唯一の事実データ
src = [tuple(map(int,input().split())) for i in range(N)]
 
INF = float('inf')
#ここ以降でかかれてあるcx,cyはあくまで頂上であると仮定しているだけで条件と合わない場合に不適切な座標となる。
for cx in range(0,101):
    for cy in range(0,101):
        tmph = None
        maxh = INF
        for x,y,h in src:
            if h > 0:
                tmp = h + abs(x-cx) + abs(y-cy)
                if tmph is None:
                    tmph = tmp
                else:
                    if tmp != tmph:
                        break
                if tmph > maxh:
                    break
            else:
                #ここでmaxhがtmphよりも小さくなってしまった場合、hは0だから頂点からのxとyの差の和がtmphはなければならないのに、それを下回っているため
                #データx,yは絶対的な値なのでcx,cyが間違っていることになる。それを判定するのが上のtmph > maxh の時となり
                maxh = min(maxh, abs(x-cx) + abs(y-cy))
                #ピラミッドが高さ１の頂点のみだった場合、h=1のデータが与えられていればいいがh=０しか与えられていない時のため
#                 if maxh == 1:
#                     tmph = 1
        else:
            for x,y,h in src:
                if max(tmph - abs(x-cx) - abs(y-cy), 0) != h:
                    break
            else:
                print(cx,cy,tmph)
                exit()
A,B = map(int, input().split())
print((A+B)/2 if (A+B)%2 == 0)

### FIXED CODE ###

#135  Harmony
A,B = map(int, input().split())
print((A+B)//2 if (A+B)%2 == 0 else 'IMPOSSIBLE')