Harryxun/stf_run huggingface dataset:
while(1):
    try:
        N,M=map( int,raw_input().split())
        W=[[] for i in range(3)]
        for i in range(N):
            name=raw_input()
            inp=map( int,raw_input().split())
            c=inp[0]
            for i in range(3):
                W[i].append([c, inp[1+i]])
        for i in range(3):
            W[i].sort(key = lambda x:x[0])
        ans=0
        for i in range(3):
            DP=[[0 for x in range(M+1)] for y in range(N)]

            for t in range(M+1):
                ci=W[i][0][0]*t
                if ci <= M:
                    DP[0][ci]=W[i][0][1]*t
                else:
                    break

            for y in range(1,N):
                for x in range(M+1):
                    for t in range(M):
                        ci=W[i][y][0]*t
                        if ci <= x:
                            DP[y][x] = max(DP[y][x], DP[y-1][x-ci]+W[i][y][1]*t )
                        else:
                            break
            ans=max(ans, max(DP[-1]))
        print ans
    except:
        break



### FIXED CODE ###

while(1):
    try:
        N,M=map( int,raw_input().split())
        W=[[] for i in range(3)]
        for i in range(N):
            name=raw_input()
            inp=map( int,raw_input().split())
            c=inp[0]
            for i in range(3):
                W[i].append([c, inp[1+i]])
        for i in range(3):
            W[i].sort(key = lambda x:x[0])
        ans=0
        for i in range(3):
            U=[0 for x in range(M+1)]
            V=[0 for x in range(M+1)]
            for y in range(N):
                for t in range(M+1):
                    ci=W[i][y][0]*t
                    if ci <= M:
                        U[ci]=max(U[ci], W[i][y][1]*t)
                    else:
                        break
            for j in range(M+1):
                for k in range(j+1):
                    V[j]=max(V[j], V[j-k]+U[k])
            ans=max(ans, V[-1])
        print ans
    except:
        break
n, m = map(int, input().split())
par = [i for i in range(n)]
diff = [0]*n

def find(x):
    if par[x] == x:
        return x, 0
    else:
        a, b = find(par[x])
        par[x] = a
        diff[x] += b
        return a, diff[x]


def unite(x,y,z):
    s, ws = find(x)
    t, wt = find(y)
    #print(ws, wt)
    if s==t:
        if ws - wt == z:
            pass
        else:
            print('No')
            exit(0)
    else:
        par[s] = t
        diff[s] = z

unites =[]
for _ in range(m):
    l,r,d = map(int, input().split())
    unites.append((l,r,d))
    unite(l-1,r-1,d)
for x, y, z in unites:
    unites(x-1, y-1, d)

print('Yes')

### FIXED CODE ###

n, m = map(int, input().split())
par = [i for i in range(n)]
diff = [0] * n


def find(x):
    if par[x] == x:
        return x, 0
    else:
        a, b = find(par[x])
        par[x] = a
        diff[x] += b
        return a, diff[x]


def unite(x, y, z):
    s, ws = find(x)
    t, wt = find(y)
    # print(ws, wt)
    if s == t:
        if ws - wt == z:
            pass
        else:
            print('No')
            exit(0)
    else:
        if ws < z + wt:
            par[s] = t
            diff[s] = z + wt - ws
        else:
            par[t] = s
            diff[t] = ws - z - wt


for _ in range(m):
    l, r, d = map(int, input().split())
    unite(l - 1, r - 1, d)

print('Yes')
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

import numpy as np
v = np.stack([np.array(list(rs()),dtype=object), np.array(list(rs()),dtype=object)])
v = v.T.flatten()
print(''.join(v))

### FIXED CODE ###

import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

o = rs()
e = rs()
ans = ''
for i in range(len(o)):
    ans += o[i]
    if i < len(e):
        ans += e[i]
print(ans)
a,b=(int(x) for x in input().split())
c = ( a + b ) % 3
if (a % '3' == '0' or str(b) % '3' == '0' or (c) == '0'):
    print ( 'Possible' )
else:
    print ( 'Impossible' )

### FIXED CODE ###

a,b=(int(x) for x in input().split())
c = ( a + b ) % 3
if ((int(a) % 3)  == 0 or  (int(b) % 3)  == 0 or int(c) == 0):
    print ( 'Possible' )
else:
    print ( 'Impossible' )
n_str = input()
for i in range(3):
  if n_str[i] == '1':
    n_str[i] = '9'
  else:
    n_str[i] = '1'
    
print(n_str)

### FIXED CODE ###

n_str = input()
res = 0
for i in range(3):
  s = (10 - int(n_str[i])) * 10**(2-i)
  res = res + s


print(res)
N=int(input())
S=N%2
if S==0:
  print(N//2)
else:
  print(N//2)+1

### FIXED CODE ###

N=int(input())
S=N%2
if S==0:
  print(N//2)
else:
  print(N//2+1)
import math
A, B, C, D = map(int, input().split())
k = B - A +1
A -=1
count = round((B//C + B//D - B//((C*D)/math.gcd(C, D)))-(A//C + A//D - A//((C*D)/math.gcd(C, D))))

print(k-count)

### FIXED CODE ###

import fractions
def lcm(a,b):
  return a*b //fractions.gcd(a, b)

A, B,C,D = map(int, input().split())

b_num = B//C + B//D - B//lcm(C, D)
a_num = (A-1)//C + (A-1)//D - (A-1)//lcm(C, D)
print((B-(A-1))-(b_num-a_num))
N,M = map(int, input().split())
if N==M:
    print("Yes")
else:
    pritn("NO")

### FIXED CODE ###

N,M = map(int, input().split())
if N==M:
    print("Yes")
else:
    print("No")
N = int(input())
List = sorted(list(map(int, input().split())))
for i in range(N):
  if List[i] == List[i + 1]:
    print("NO")
    break
else:
  print("YES")

### FIXED CODE ###

N = int(input())
List = sorted(list(map(int, input().split())))
for i in range(N-1):
  if List[i] == List[i + 1]:
    print("NO")
    break
else:
  print("YES")
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")
#logging.disable(logging.CRITICAL)

dp = [0 for _ in range(100000)]

def main():
    N, M = map(int, input().split())
    A_B = [list(map(int, input().split()))[::-1] for _ in range(N)]
    logging.info("Hello!")

    sorted_A_B = sorted(A_B, reverse=True)
    logging.info(sorted_A_B)


    total = 0
    for i in range(M):
        if sorted_A_B[i][1] + i <= M:
            total += sorted_A_B[i][0]


    print(total)
    
if __name__ == "__main__":
    main()


### FIXED CODE ###

import logging
import heapq

logging.basicConfig(level=logging.INFO, format="%(message)s")
#logging.disable(logging.CRITICAL)


def main():
    N, M = map(int, input().split())
    A_B = [list(map(int, input().split())) for _ in range(N)]
    logging.info("Hello!")

    A_B.sort()
    logging.info(A_B)


    heap_Q = []
    curr = 0
    total = 0
    for i in range(1, M + 1):
        while curr < N and  A_B[curr][0] <= i:
            heapq.heappush(heap_Q, A_B[curr][1] * (-1))
            curr += 1

        if heap_Q:
            total += (-1) * heapq.heappop(heap_Q)

    print(total)
    
if __name__ == "__main__":
    main()
s = input()
K = int(input())

str_list = list(s)
str_list2 = list(s)
str_list2 = list(set(str_list2))
str_list2.sort()
print(str_list)
a = str_list2[0]
n = str_list.count(a)

if K==1:
    print(a)
else:
    K -= 1
    indexes = [i for i, x in enumerate(str_list) if x == a and i <len(s)-1]
    if len(indexes) >0:
        sub_list = [s[i:i+2] for i in indexes]
    indexes = [i for i, x in enumerate(str_list) if x == a and i <len(s)-2]
    if len(indexes) >0:
        sub_list += [s[i:i+3] for i in indexes]
    indexes = [i for i, x in enumerate(str_list) if x == a and i <len(s)-3]
    if len(indexes) >0:
        sub_list += [s[i:i+4] for i in indexes]
    indexes = [i for i, x in enumerate(str_list) if x == a and i <len(s)-4]
    if len(indexes) >0:
        sub_list += [s[i:i+5] for i in indexes]
    sub_list = list(set(sub_list))
    sub_list.sort()
    if len(sub_list) >= K:
        print(sub_list[K-1])
    else:
        K -= len(sub_list)
        a = str_list[1]
        if K==1:
            print(a)
        else:
            K -= 1
            indexes = [i for i, x in enumerate(str_list) if x == a and i <len(s)-1]
            if len(indexes) >0:
                sub_list = [s[i:i+2] for i in indexes]
            indexes = [i for i, x in enumerate(str_list) if x == a and i <len(s)-2]
            if len(indexes) >0:
                sub_list += [s[i:i+3] for i in indexes]
            indexes = [i for i, x in enumerate(str_list) if x == a and i <len(s)-3]
            if len(indexes) >0:
                sub_list += [s[i:i+4] for i in indexes]
            indexes = [i for i, x in enumerate(str_list) if x == a and i <len(s)-4]
            sub_list = list(set(sub_list))
            sub_list.sort()
            if len(sub_list) >= K:
                print(sub_list[K-1])
            else:
                K -= len(sub_list)
                a = str_list[2]
                if K==1:
                    print(a)
                else:
                    K -=1
                    indexes = [i for i, x in enumerate(str_list) if x == a and i <len(s)-1]
                    if len(indexes) >0:
                        sub_list = [s[i:i+2] for i in indexes]
                    indexes = [i for i, x in enumerate(str_list) if x == a and i <len(s)-2]
                    if len(indexes) >0:
                        sub_list += [s[i:i+3] for i in indexes]
                    indexes = [i for i, x in enumerate(str_list) if x == a and i <len(s)-3]
                    if len(indexes) >0:
                        sub_list += [s[i:i+4] for i in indexes]
                    indexes = [i for i, x in enumerate(str_list) if x == a and i <len(s)-4]
                    sub_list = list(set(sub_list))
                    sub_list.sort()
                    print(sub_list[K-1])

### FIXED CODE ###

s = input()
K = int(input())

subset_list = list(s)
subset_list += [s[i:i+2] for i in range(len(s)-1)]
subset_list += [s[i:i+3] for i in range(len(s)-2)]
subset_list += [s[i:i+4] for i in range(len(s)-3)]
subset_list += [s[i:i+5] for i in range(len(s)-4)]
subset_list = list(set(subset_list))
subset_list.sort()

print(subset_list[K-1])
N,T = map(int,input().split())
t = list(map(int,input().split()))
sum = 0
for i in range(N-1):
  sum += (T,t[i+1]-t[i])
print(sum)

### FIXED CODE ###

N,T = map(int,input().split())
t = list(map(int,input().split()))
sum = 0
for i in range(N-1):
  sum += min(T,(t[i+1]-t[i]))
print(sum+T)
while True:
   (H, W) =[int(i) for i in input(). split()]
  if H == W ==0:
      break

  for a in range(H):
      for b in range(W):
          if (a + b) % 2 == 0:
          print('#', end='')
      else:
          print('.',end=``)
      print()
  print()

### FIXED CODE ###

while True:
  ( H, W) = [ int(i) for i in input().split()]
  if H == W == 0:
    break
  
  for h in range( H):
    for w in range( W):
      if h == 0 or h == H-1:
        print( '#', end='')
      elif w == 0 or w == W-1:
        pass
        print( '#', end='')
      else:
        print( '.', end='')
    print()
  print()
from collections import deque
S = input()
Q = int(input())
rev = 0

for i in range(Q):
    T = input().split()
    if T[0] == '1':
        rev += 1
    else:
        if T[1] == '1':
            if rev % 2 == 0:
                S.appendleft(T[2])
            else:
                S.append(T[2])
        else:
            if rev % 2 == 0:
                S.append(T[2])
            else:
                S.appendleft(T[2])
ans = ''.join(S)
if rev % 2 ==0:
    print(ans)
else:
    print(ans[::-1])

### FIXED CODE ###

from collections import deque
S = input()
Q = int(input())
R = deque(S)
rev = 0

for i in range(Q):
    T = input().split()
    if T[0] == '1':
        rev += 1
    else:
        if T[1] == '1':
            if rev % 2 == 0:
                R.appendleft(T[2])
            else:
                R.append(T[2])
        else:
            if rev % 2 == 0:
                R.append(T[2])
            else:
                R.appendleft(T[2])
ans = ''.join(R)
if rev % 2 ==0:
    print(ans)
else:
    print(ans[::-1])
a ,b,c= map(str, input().split())
if b =="+":
    print(int(a)+int(b))
elif b =="-":
    print(int(a)-int(b))

### FIXED CODE ###

a ,b,c= map(str, input().split())
if b =="+":
    print(int(a)+int(c))
elif b =="-":
    print(int(a)-int(c))
import fractions
from functools import reduce

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(l):
    return reduce(lcm, l, 1)


ans = 0

dev = 10 ** 9 + 7

n = int(input())

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

z = lcm_list(a) * 


for i in a:
    ans += z // i
    #ans = ans % dev

print(ans%dev)

### FIXED CODE ###

import fractions
from functools import reduce

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(l):
    return reduce(lcm, l, 1)


ans = 0

dev = 10 ** 9 + 7

n = int(input())

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

z = lcm_list(a)



for i in a:
    ans += z // i
    #ans = ans % dev

print(ans%dev)
n, m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()
l = [x[i]-x[i-1] for i in range(1,m)]
ans = x[m-1] - x[0] 
if len(x) == 1:
    print(ans)
else:
    for i in range(n-1):
        ans -= max(l)
        l.remove(max(l))
    print(ans)

### FIXED CODE ###

n, m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()
l = [x[i]-x[i-1] for i in range(1,m)]
l.sort(reverse=True)
ans = x[m-1] - x[0]
if n >= m:
    print(0)
else:
    for i in range(n-1):
        ans -= l[i]
    print(ans)
A = raw_input()
C = raw_input()

B = int(C)

num = map(int, str(A))

i = 0

while num[i] == 1:
  i = i +1

  
if i < B:
  print num[i]
elif i > B-1:
  print 1



### FIXED CODE ###

A = raw_input()
C = raw_input()

B = int(C)

num = map(int, str(A))

numnum = len(num)


i = 0

while num[i] == 1 and numnum-1 > i:
  i = i +1

  
if i < B:
  print num[i]
elif i > B-1:
  print 1
N,K = map(int,input().split())
h = list(map(int,input().split()))

costs = [0] * N
for i in range(1,N):
  s = max(i-K, 0)
  mn = float('inf')
  for a,b in zip(costs[s:i],h[s:i]):
    cur = a + abs(h[i]-b)
    mn = min(mn,cur)
 
  costs[i] = mn
print(costs[-1])

### FIXED CODE ###

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

costs = [0] * N
costs[0] = 0
costs[1] = abs(h[1] - h[0])
for i in range(2,N):
  tmp1 = costs[i-2] + abs(h[i] - h[i-2])
  tmp2 = costs[i-1] + abs(h[i] - h[i-1])
  costs[i] = min(tmp1,tmp2)
print(costs[N-1])
s,t = map(input().split())
a,b = map(int,input().split())
u = input()

if u == s:
  print((a-1),b)
else:
  print(a,(b-1))

### FIXED CODE ###

s,t = input().split()
a,b = map(int,input().split())
u = input()

if u == s:
  print((a-1),b)
else:
  print(a,(b-1))
#標準入力
N = int(input())
D, X = list(map(int, input().split()))

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

    
B=[]
for i in range(N):
    B[i] = 1 + A[i]//(D-1)
    
Total = X + sum(B)

print(Total)



### FIXED CODE ###

N = int(input())
D, X = map(int, input().split())
A = []
for i in range(N):
    A.append(int(input()))
    
B=0
for i in range(N):
    B += 1 + (D-1)//A[i]

    
Total = X + B

print(Total)
l,r=list(map(int, input().split()))
c=[0]*(r-l+1)
for i in range(l,r+1):
	c[i-l]=i%2019
minc=min(c)
print(minc*minc+1))

### FIXED CODE ###

l,r=list(map(int, input().split()))
minmod=2018
if r-l>=2018:
	print(0)
else:
	for i in range(l,r+1):
		for j in range(i+1,r+1):
			minmod=min(minmod,(i*j)%2019)
	print(minmod)
n = int(input())
w = list(map(int,input().split()))
ans = 1e100
for t in w:
  over = 0
  under= 0
  for i in w:
    if i > w:
      over += i
    else:
      under+= i
  ans = min(ans,abs(over - under))
print(ans)


### FIXED CODE ###

n = int(input())
w = list(map(int,input().split()))
ans = sum(w)
for i in range(1,n):
  ans = min(ans, abs(sum(w[:i])-sum(w[i:])))
print(ans)
s = input()
if s=='AAA' or s='BBB':
    print('No')
else:
    print('Yes')

### FIXED CODE ###

s = input()
if s=='AAA' or s=='BBB':
    print('No')
else:
    print('Yes')
n=int(intput())
arr=list(input().slpit())
arr.sort();
x=int(1)
for i in arr:
  x=x*i
  if x>1e18:
    x=-1;
    break;
print(x)
  

### FIXED CODE ###

n=int(input())
arr=list(map(int,input().split()))
arr.sort();
x=int(1)
for i in arr:
  x=x*i
  if x>1e18:
    x=-1;
    break;
print(x)
input()
S = input().strip()
color = len(set(list(S)))

def DP(i,s):
  me = 1 if len(s) > 0 else 0
  # 葉
  if len(S) <= i:
    return me
  
  # S[i]を採用しない
  notadopt = DP(i+1, s)
  
  # S[i]を採用する
  if S[i] not in s:
    s += S[i]
    adopt = DP(i+1, s)
  else:
    adopt = 0

  return adopt + notadopt

print(DP(0, '')%(10**9+7))
  

### FIXED CODE ###

from collections import Counter
input()
S = input().strip()
c = Counter(S)
ans = 1
for k,v in c.items():
  ans *= (v+1)
print((ans-1)%(10**9+7))
N = int(input())
if(n%2 ==0):
  print(n/2)
else:
  print((n/2)+1)

### FIXED CODE ###

import math
N = int(input())
if( N%2 == 0 ):
  print(int(N/2))
else:
  print(math.ceil((N/2)))
def main():
    N = int(input())
    A = [int(x) for x in input().split()]
    zero = 3
    ans = 1
    ls = [0 for _ in range(N)]
    mod = 1000000007
    for i in A:
        if i == 0:
            ans = (ans*zero)%mod
            zero -= 1
            ls[i] += 1
        else:
            ans = (ans*(ls[i-1]-ls[i]))%mod
            ls[i] +=1

    print(ans)
if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    N = int(input())
    A = [int(x) for x in input().split()]
    zero = 3
    ans = 1
    ls = [0 for _ in range(N)]
    mod = 1000000007
    for i in A:
        if i == 0:
            ans = (ans*zero)%mod
            zero -= 1
            ls[i] += 1
        else:
            ans = (ans*(ls[i-1]-ls[i]))%mod
            ls[i] +=1

    print(ans)
if __name__ == "__main__":
    main()
#全探索
ans = 0
keta = 10**(n-1)
for i in range(keta, 10**5):
    s = str(i)
    flag = True
    for j in range(m): 
        if int(s[digit[j]-1]) != value[j]: #違ったらFalse
            flag = False
    if flag:
        ans = i
        break
print(ans if flag else '-1')

### FIXED CODE ###

n,m = map(int,input().split())
digit = [0]*(m)
value = [0]*(m)
for i in range(m):
    digit[i],value[i] = map(int,input().split())

#全探索
ans = 0
for i in range(10**3):
    s = str(i)
    if len(s)!=n: continue
    for j in range(m): 
        if int(s[digit[j]-1]) != value[j]:
            break
    else:
        print(i)
        exit()
print('-1')
import numpy as np
N, a, b = map(int, input().split())
M = 1000000007

m = N//2 + 1
fact_list = np.ones(N+1, dtype='int32')
fact_inv = np.ones(N+1, dtype='int32')

for i in range(1, N+1):
    fact_list[i] = fact_list[i-1] * i % M

for i in range(1, N+1):
    fact_inv[i] = pow(int(fact_list[i]), M-2, M)

def mod_comb_k(n,k,M):
    return int(fact_list[n]) * int(fact_inv[k]) % M * int(fact_inv[n-k]) % M

ans = 0
for i in range(1, N+1):
    if i == a or i == b:
        continue
    ans += mod_comb_k(N, i, M) % M
    # print(ans)
print(ans)








### FIXED CODE ###

N, a, b = map(int, input().split())
M = 1000000007


def mod_comb_k(n, k):
    n_P_n_k = 1
    fact_k = 1
    for i in range(k):
        n_P_n_k = n_P_n_k * (n - i) % M
        fact_k = fact_k * (i + 1) % M
    return n_P_n_k * pow(fact_k, M-2, M)

ans = (pow(2, N, M) - 1 - mod_comb_k(N, a) - mod_comb_k(N, b)) % M
print(ans)
a,b,h,m = map(int,input().split())
import math
alp = 0.5*(h*60+m)/180*math.pi
be = 6*m/180*math.pi
if alp >=be:
    if alp-be < math.pi: 
        l = (a**2+b**2 - 2*a*b*math.cos(alp - be))**(1/2)
    else:
        l = (a**2+b**2 + 2*a*b*math.cos(alp - be))**(1/2)
else:
    if be-alp < math.pi:
        l = (a**2+b**2 - 2*a*b*math.cos(be - alp))**(1/2)
    else:
        l = (a**2+b**2 + 2*a*b*math.cos(be - alp))**(1/2)
print(l)

### FIXED CODE ###

n = int(input())
p = n%10
hon = [2,4,5,7,9]
pon = [0,1,6,8]
if p in hon:
    print('hon')
elif p in pon:
    print('pon')
else:
    print('bon')
import math
a,b = map(int,input().split())
g = math.gcd(a,b)

print(round(a*b/g))

### FIXED CODE ###

a,b = map(int,input().split())
import fractions
g = fractions.gcd(a,b)

print(round(a*b/g))
a, b = list(map(int, input().split())
s = a * b
l = 2 * a + 2 * b
print(s, l)

### FIXED CODE ###

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

import sys
import os
import pprint

#fd = os.open('ITP1_1_C.txt', os.O_RDONLY)
#os.dup2(fd, sys.stdin.fileno())

a, b = list(map(int, input().split()))
s = a * b
l = 2 * a + 2 * b
print(s, l)
import random
D=int(input())
C=np.array(list(map(int,input().split())))
S=[]
for _ in range(D):
    S.append(list(map(int,input().split())))



for i in range(D):
    print(random.randint(1,26))

### FIXED CODE ###

import random
import numpy as np


D=int(input())
C=np.array(list(map(int,input().split())))
S=[]
for _ in range(D):
    S.append(list(map(int,input().split())))


T=[]
for i in range(D):
    print(np.argmax(S[i])+1)
n = int(input())
a_li = list(set(int(x) for x in input().split()))

while 1:
    res = a_li[-1]
    a_li.sort(reverse = True)
    cou = 0
    for i in a_li[:-1]:
        a_li[cou] = i % a_li[-1]
        cou += 1
        print(a_li)
    a_li = list(set(a_li))
    try:
        a_li.remove(0)
    except:
        pass
    print(a_li)
    if len(a_li) == 0:
        print(res)
        break
    if len(a_li) == 1:
        print(a_li[0])
        break


### FIXED CODE ###

n = int(input())
a_li = list(set(int(x) for x in input().split()))

while 1:
    res = a_li[-1]
    a_li.sort(reverse = True)
    cou = 0
    for i in a_li[:-1]:
        a_li[cou] = i % a_li[-1]
        cou += 1
    a_li = list(set(a_li))
    try:
        a_li.remove(0)
    except:
        pass
    if len(a_li) == 0:
        print(res)
        break
    if len(a_li) == 1:
        print(a_li[0])
        break
x,y,z = map(int, input().split())

if (x == y and y != z) or (x==z and y !=z) or (a !=b and b==c)
  print("Yes")
else:
  print("No")


### FIXED CODE ###

x,y,z = map(int, input().split())

if (x == y and y != z) or (x==z and y !=z) or (x !=y and y==z):
  print("Yes")
else:
  print("No")
K = int(input())

if K == 1:
    print("ACL"):
elif K == 2:
    print("ACLACL"):
elif K == 3:
    print("ACLACLACL"):
elif K == 4:
    print("ACLACLACLACL"):
else:
    print("ACLACLACLACLACL"):


### FIXED CODE ###

K = int(input())

if K == 1:
    print("ACL")
elif K == 2:
    print("ACLACL")
elif K == 3:
    print("ACLACLACL")
elif K == 4:
    print("ACLACLACLACL")
else:
    print("ACLACLACLACLACL")
def gcd(a,b):
  a,b=max(a,b),min(a,b)
  while b!=0:
    a,b=b,a%b
  return a
def gcd(a,b,c):
  return gcd(gcd(a,b),c)
ct=0
k=int(input())
for i in range(1,k+1):
  for j in range(1,k+1):
    for k in range(1,k+1):
      ct+=gcd(i,j,k)
print(ct)


### FIXED CODE ###

def gcd(a,b):
  a,b=max(a,b),min(a,b)
  while b!=0:
    a,b=b,a%b
  return a
ct=0
k=int(input())
for i in range(1,k+1):
  for j in range(1,k+1):
    for k in range(1,k+1):
      ct+=gcd(gcd(i,j),k)
print(ct)
a = input()
b = input()
if aa[0] == b[2] and a[1] == b[1] and [2] == b[0]:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

a = input()
b = input()
if (a[0] == b[2]) and (a[1] == b[1]) and (a[2] == b[0]):
    print("YES")
else:
    print("NO")
import math
N = input()
N = int(N)
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(2, N))

### FIXED CODE ###

N = input()
N = int(N)
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

def lcm(x, y):
    return (x * y) // gcd(x, y)

print(lcm(2, N))
N = input()
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
ans = B[A[0]]
for i in range(1, len(A)):
  ans += B[A[i]]
  if A[i - 1] == A[i] - 1:
    ans += C[A[i - 1]]
print(ans)


### FIXED CODE ###

N = input()
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
ans = B[A[0] - 1]
for i in range(1, len(A)):
    ans += B[A[i] - 1]
    if A[i - 1] == A[i] - 1:
        ans += C[A[i - 1] - 1]
print(ans)
import numpy as np

x = 1000000007

S = input()
S = [int(s) if s != '?' else s for s in S]
S = S[::-1]

r = np.zeros((13,))
new_r = np.zeros((13,))

r[0] = 1

for i, s in enumerate(S):
    for j in range(10):
        if s != '?' and s != j:
            continue

        digit_r = ((10 ** i) * j) % 13

        for k in range(13):
            new_r[(digit_r + k) % 13] += r[k]

    new_r %= x

    r = new_r
    new_r = np.zeros((13,))

print(int(r[5] % x))


### FIXED CODE ###

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

K = (A + B) / 2

if int(K) == K:
    print(int(K))
else:
    print('IMPOSSIBLE')