Harryxun/stf_run huggingface dataset:
N, K = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
i = 0
ans = 0
if (K == 0):
    return print(sum(A))
while((1<<i) <= K):
    tmp = [(a>>i)%2 for a in A]
    cnt = sum(tmp)
    ans += (max(cnt, N-cnt) << i)
    i += 1
i -= 1
if (1 << i == K):
    print(ans)
else:
    for j in range(1<<i+1, K+1):
        ans = max(ans, [j ^ a for a in A])
    print(ans)


### FIXED CODE ###

N, K = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
MAX_DIGIT = 50
dp = [[-1, -1] for _ in range(MAX_DIGIT+1)]
dp[MAX_DIGIT][0] = 0
# print(dp)
# print([bin(a) for a in A])
for d in range(MAX_DIGIT-1, -1, -1):
    # print([(a>>d)%2 for a in A])
    cnt = sum([(a>>d)%2 for a in A])
    c0 = cnt << d
    c1 = (N - cnt) << d
    # print(1 << d+1, c0, c1)
    if (dp[d+1][1] != -1):
        dp[d][1] = max(dp[d][1], dp[d+1][1] + max(c0, c1))
    if (dp[d+1][0] != -1 and (K>>d)%2 == 1):  
        dp[d][1] = max(dp[d][1], dp[d+1][0] + c0)
    if (dp[d+1][0] != -1):
        if (K>>d)%2 == 1:
            dp[d][0] = max(dp[d][0], dp[d+1][0] + c1)
        else:
            dp[d][0] = max(dp[d][0], dp[d+1][0] + c0)
    # print(dp)
print(max(dp[0][0], dp[0][1]))
S=input()
abc=[chr(ord('a')+i) for i in range(26)]

if len(S)<26:
    for s in S:
        abc.remove(s)
    print(S+abc[0])
else:
    index_z=S.index('z')
    index_=abc.index(S[index_z-1])
    abc_=abc[index_:]
    for s in S[:index_z]:
        abc_.remove(s)
    print(S[:index_z-1]+abc_[0])

### FIXED CODE ###

S=input()
abc=[chr(ord('a')+i) for i in range(26)]

if len(S)<26:
    for s in S:
        abc.remove(s)
    print(S+abc[0])
    exit()
for i in range(24,-1,-1):
    for j in range(25,i,-1):
        if S[i]<S[j]:
            print(S[:i]+S[j])
            exit()

print(-1)
import queue
N,M=map(int,input().split())
adj=[[] for _ in range(M+1)]
for i in range(M):
    A,B=map(int,input().split())
    adj[A].append(B)
    adj[B].append(A)
parent=[-1]*(N+1)
q=queue.Queue()
q.put((1,0))
while(not q.empty()):
    x,p=q.get()
    if parent[x]!=-1:
        continue
    parent[x]=p
    for next in adj[x]:
        if parent[next]==-1:
            q.put((next,x))
print('Yes')
for k in parent[2:]:
    print(k)

### FIXED CODE ###

import queue
N,M=map(int,input().split())
adj=[[] for i in range(N+1)]
parent=[-1] * (N+1)
for m in range(M):
    a,b=map(int,input().split())
    adj[a].append(b)
    adj[b].append(a)
q=queue.Queue()
q.put((1,0))
while(not q.empty()):
    x,p=q.get()
    if parent[x]!=-1:
        continue
    parent[x]=p
    for next in adj[x]:
        if parent[next]==-1:
            q.put((next,x))
print('Yes')
for p in parent[2:]:
    print(p)
2 * R * (3 + 1/10 + 4/100)

### FIXED CODE ###

print(int(input()) * 6.28)
import bisect
n = int(input())
ls = list(range(n+1))

ans = 10**9
for a in range(1,n):
    b = bisect.bisect_left(ls, n/a)
    ans = min(ans,int(max(len(str(a)),len(str(ls[b])))))
print(ans)
    

### FIXED CODE ###

import math

n = int(input())
small = [1]
large = [n]
for i in range(2,int(n**0.5)+1):
    if not (n%i):
        small.append(i)
        large.append(n//i)
print(int(math.log10(large[-1]))+1)
n = int(input())
a = list(map(int, input().split()))
a_joined = 0

for i in range(n):

	a_joined = a_joined | a[i]

print(len(bin(a_joined)) - 3)

### FIXED CODE ###

print(str(input()).count("1"))
import string
def inpl(): return list(map(int, input().split()))
H, W = inpl()
a = []
for i in range(H):
    a.append(inpl())

for i in range(H):
    for j in range(W):
        if a[i][j] == 'snuke':
            print(string.ascii_lowercase[j]+str(i+1))
            break

### FIXED CODE ###

import string
H, W = map(int, input().split())
a = []
for i in range(H):
    a.append(input().split())

for i in range(H):
    for j in range(W):
        if a[i][j] == 'snuke':
            print(string.ascii_uppercase[j]+str(i+1))
            break
import math

N,K = list(map(int,input().split()))
odd = 0

if N >= K:
  odd += (N-K+1)/N
  for i in range(K-1):
    if (math.log2(K/i))%1==0:
      odd += i/(K*N)
    else:
      odd += (1/N)*(0.5**(int(math.log2(K/i))+1))
else:
  for i in range(N):
    if (math.log2(K/i))%1==0:
      odd += i/(K*N)
    else:
      odd += (1/N)*(0.5**(int(math.log2(K/i))+1))
      
print(odd)
    

### FIXED CODE ###

import math

N,K = list(map(int,input().split()))
odd = 0

if N >= K:
  odd += (N-K+1)/N
  for i in range(K-1):
    if (math.log2(K/(i+1)))%1==0:
      odd += (i+1)/(K*N)
    else:
      odd += (1/N)*(0.5**(int(math.log2(K/(i+1)))+1))
else:
  for i in range(N):
    if (math.log2(K/(i+1)))%1==0:
      odd += (i+1)/(K*N)
    else:
      odd += (1/N)*(0.5**(int(math.log2(K/(i+1)))+1))
      
print(odd)
# from operator import mul
# from functools import reduce

n=int(input())
a=list(map(int,input().split()))
limit=10**18

if 0 in a:
    print(0)
    exit()

ans = 1
# ans = reduce(mul, a) #=> 1320

for i in range(a):
  ans *= a[i]
  if sum> limit:
  # if a[i] == 0:
  #   break
  # elif (ans*a[i]) > limit:
    ans = -1
    break

# if ans > limit:
#   print(-1)
# else:
print(ans)


### FIXED CODE ###

# from operator import mul
# from functools import reduce

n=int(input())
a=list(map(int, input().split()))
# limit=10**18

# if 0 in a:
#     print(0)
#     exit()

ans = 1
# ans = reduce(mul, a) #=> 1320

for i in range(n):
  ans *= a[i]
  if ans > 10 ** 18:
  # if a[i] == 0:
  #   break
  # elif (ans*a[i]) > limit:
    ans = -1
    break

for i in range(n):
  if a[i] == 0:
      ans = 0

# if ans > limit:
#   print(-1)
# else:
print(ans)
import math

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

if x == (a**2)*b/2:
    ans = 45
elif x < (a**2)*b/2:
    rad = math.atan(2*x/(a*b**2))
    ans = math.degrees(rad)
else:
    rad = math.atan(a**3/(2*a**2*b - 2*x))
    ans = math.degrees(rad)
print(90-ans)

### FIXED CODE ###

import math

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

if x == (a**2)*b:
    ans = 90
elif x == (a**2)*b/2:
    ans = 45
elif x < (a**2)*b/2:
    rad = math.atan(2*x/(a*b**2))
    ans = math.degrees(rad)
else:
    rad = math.atan(a**3/(2*a**2*b - 2*x))
    ans = math.degrees(rad)
print(90-ans)
import fractions
N,K = map(int,input().split())
A = sorted(list(map(int,input().split())))[::-1]
#print(A)
if A[0] < K:
  print("IMPOSSIBLE")
  exit()
else:
  G = fractions.gcd(A[0],A[1])
  for g in range(2,N):
    G = fractions.gcd(G,A[g])
  print(G)
  if K % G != 0:
    print("IMPOSSIBLE")
    exit()
print("POSSIBLE")



### FIXED CODE ###

import fractions
from functools import reduce
N,K = map(int,input().split())
A = list(map(int,input().split()))
if max(A) < K:
  print("IMPOSSIBLE")
elif N == 1:
  if A[0] == K:
    print("POSSIBLE")
  else:
    print("IMPOSSIBLE")
else:
  G = fractions.gcd(A[0],A[1])
  for g in range(2,N):
    G = fractions.gcd(G,A[g])
  if K % G != 0:
    print("IMPOSSIBLE")
  else:
    print("POSSIBLE")
x = int(input())
for i in range(-118, 120):
  for j in range(-119, 119):
    if i**5 - j**5 = x:
      print(i, j)
      exit(0)


### FIXED CODE ###

s = input()
if s == "ABC":
    print("ARC")
else:
    print("ABC")
def Warshall_floyd(d, n):
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j], d[i][k] + d[k][j])
    return d

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

d = [[float("inf") for i in range(N)] for i in range(N)] 

M = [[1 for i in range(W+1)] for i in range(H+1)]
for i in range(H):
    m = input().strip()
    for j in range(W):
        if m[j] == '.':
            M[i][j] = 0

for i in range(H):
    for j in range(W):
        if M[i][j] == 0:
            d[W*i+j][W*i+j] = 0
            if M[i][j+1] == 0:
                d[W*i+j][W*i+j+1] = 1
                d[W*i+j+1][W*i+j] = 1
            if M[i+1][j] == 0:
                d[W*i+j][W*(i+1)+j] = 1
                d[W*(i+1)+j][W*i+j] = 1

o = warshall_floyd(d, N)
ans = 0
for i in range(N):
    for j in range(N):
        if o[i][j] != float('inf'):
            ans = max(ans, o[i][j])
print(ans)

### FIXED CODE ###

def warshall_floyd(d, n):
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j], d[i][k] + d[k][j])
    return d

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

d = [[float("inf") for i in range(N)] for i in range(N)] 

M = [[1 for i in range(W+1)] for i in range(H+1)]
for i in range(H):
    m = input().strip()
    for j in range(W):
        if m[j] == '.':
            M[i][j] = 0

for i in range(H):
    for j in range(W):
        if M[i][j] == 0:
            d[W*i+j][W*i+j] = 0
            if M[i][j+1] == 0:
                d[W*i+j][W*i+j+1] = 1
                d[W*i+j+1][W*i+j] = 1
            if M[i+1][j] == 0:
                d[W*i+j][W*(i+1)+j] = 1
                d[W*(i+1)+j][W*i+j] = 1

o = warshall_floyd(d, N)
ans = 0
for i in range(N):
    for j in range(N):
        if o[i][j] != float('inf'):
            ans = max(ans, o[i][j])
print(ans)
train1=int(input())
train2=int(input())
bus1=int(input())
bus2=int(input())
print(min(train1,train2)+min(bus1+bus2))

### FIXED CODE ###

train1=int(input())
train2=int(input())
bus1=int(input())
bus2=int(input())
print(min(train1,train2)+min(bus1,bus2))
N=int(input())
dst = []
dst.append(input().split())

max_ = 0
for i in range(N-1):
    if dst[0][i] >= dst[0][i+1]:
        count += 1
        if count > max_:
            max_ = count
    else:
        count = 0
print(max_)

### FIXED CODE ###

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

cmax = 0
count = 0
for i in range(N-1):
    if dst[i] >= dst[i+1]:
        count += 1
        if count > cmax:
            cmax = count
    else:
        count = 0
        
print(cmax)
n, m = map(int, input().split())
List1 = [[0 for i in range(m)] for i in range(n)]
for x in range(n):
    List1[x] = list(map(int, input().split()))
List2 = [int(input()) for i in range(n + 1)]
sum = [0 for i in range(n)]
for x in range(n):
    for y in range(m):
        sum[x] += List1[x][y] * List2[y]
for x in range(n):
    print(sum[x])



### FIXED CODE ###

n, m = map(int, input().split())
List1 = [[0 for i in range(m)] for i in range(n)]
for x in range(n):
    List1[x] = list(map(int, input().split()))
List2 = [int(input()) for i in range(m)]
sum = [0 for i in range(n)]
for x in range(n):
    for y in range(m):
        sum[x] += List1[x][y] * List2[y]
for x in range(n):
    print(sum[x])
N = int(input())
S = input()

num_r, num_g = S.count('R'), S.count('G')
num_b = N - num_r - num_g
max_ans = num_r * num_g * num_b
count_not_ans = 0

for i in range(N-2):
    for j in range(i+1, N-1):
        k = 2 * j - i
        si, sj, sk = S[i], S[j], S[k]
        if (0 <= k <= N-1) and si != sj and sj != sk and sk != si:
            count_not_ans += 1

print(max_ans - count_not_ans)


### FIXED CODE ###

N = int(input())
S = input()

num_r, num_g = S.count('R'), S.count('G')
num_b = N - num_r - num_g
max_ans = num_r * num_g * num_b
count_not_ans = 0
S = list(S)

for i in range(N):
    for j in range(i+1, N):
        k = 2 * j - i
        if (0 <= k <= N-1) and len(set([S[i], S[j], S[k]])) == 3:
            count_not_ans += 1

print(max_ans - count_not_ans)
X, N = [int(i) for i in input().split()]
if N == 0:
    print(X)
else:
    Ps = set([int(i) for i in input().split()])
    # coords = set(range(min(Ps), max(Ps)+1))
    # for p in Ps:
    #     coords.remove(p)
    # if X in coords:
    #     print(X)
    # else:
    #     ret = [ (v, abs(X-v)) for v in coords ]
    #     minval = min(ret, key=lambda elm: elm[1])[0]
    #     print(
    #         min([ elm[0] for elm in ret if minval == elm[0] ])
    #     )
    coords = list(range(1, 101))
    if not X in Ps:
        print(X)
    i = X - 1
    diff = 0
    while True:
        if not coords[i - diff] in Ps:
            print(coords[i - diff])
            break
        if not coords[i + diff] in Ps:
            print(coords[i + diff])
            break
        diff += 1

### FIXED CODE ###

X, N = [int(i) for i in input().split()]
if N == 0:
# if False:
    print(X)
else:
    Ps = set([int(i) for i in input().split()])
    # if not X in Ps:
    #     print(X)

    # print(f'{X} {sorted(Ps)}')
    diff = 0
    while True:
        a = X - diff
        if a not in Ps:
            print(a)
            break
        a = X + diff
        if a not in Ps:
            print(a)
            break
        diff += 1
n ,m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ans = 0
while k > 0:
  i, j = 0
  if a[i] <= b[j]:
    k -= a[i]
    if k >= 0
      i += 1
      ans += 1
  else:
    k -= b[j]
    if k >= 0
      j += 1
      ans += 1
print(ans)

### FIXED CODE ###

n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

a_cs, b_cs = [0], [0]
for i in range(n):
  a_cs.append(a_cs[i] + a[i])
for i in range(m):
  b_cs.append(b_cs[i] + b[i])

ans, j = 0, m
for i in range(n+1):
  if a_cs[i] > k:
    break
  while b_cs[j] > k - a_cs[i]:
    j -= 1
  ans = max(ans, i + j)
print(ans)
n = int(input().strip())

l = []
for _ in range(n):
    cmd = input()
    if cmd == "deleteFirst":
        l = l[1:]
    elif cmd == "deleteLast":
        l.pop()
    elif cmd.startswith("insert "):
        _, e = cmd.split(" ")
        l.insert(0, e)
    elif cmd.startswith("delete "):
        _, e = cmd.split(" ")
        l.remove(e)

print(" ".join(l)) 

### FIXED CODE ###

from collections import deque

q = deque()

n = int(input().strip())

for _ in range(n):
    cmd = input()
    if cmd == "deleteFirst":
        q.popleft()
    elif cmd == "deleteLast":
        q.pop()
    elif cmd.startswith("insert "):
        v = cmd[7:]
        q.appendleft(v)
    elif cmd.startswith("delete "):
        v = cmd[7:]
        try:
            q.remove(v)
        except ValueError:
            pass
print(" ".join(q))
A_B_C = input().split()
A = int(A_B_C[0])
B = int(A_B_C[1])
C = int(A_B_C[2])

left = 0
if A >= B + C:
  left = 0
else:
  left = C - (A-B)
  
 print(left)

### FIXED CODE ###

A_B_C = input().split()
A = int(A_B_C[0])
B = int(A_B_C[1])
C = int(A_B_C[2])

left = 0
if A >= (B+C):
  left = 0
else:
  left = C - (A-B)
print(left)
import functools
import fractions
import copy

N = int(input())
A_list = list(map(int, input().split()))
vlaues = []
values_list = []

for i in range(N):
    values = copy.copy(A_list)
    del values[i]
    gcd = functools.reduce(fractions.gcd, values)
    values_list.append(gcd)

print(max(values_list))



### FIXED CODE ###

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

s = (T + 0.5) // A

ans = int(s * B)

print(ans)
from collections import Counter
n=int(input())
nums=list(map(int,input().split()))
a=set(nums)
if len(a)==1:
  print(n//2)
else:
  odd=nums[::2]
  even=nums[1::2]
  o=Counter(odd)
  e=Counter(even)
  ans=n-o.most_common()[0][1]-e.most_common()[0][1]
  if o.most_common[0][0]==e.most_common[0][0]:
    print(ans+min(o.most_common[1][1]-o.most_common[0][1],e.most_common[1][1]-e.most_common[0][1]))
  else:  
    print(ans)


### FIXED CODE ###

from collections import Counter
n=int(input())
nums=list(map(int,input().split()))
a=set(nums)
if len(a)==1:
  print(n//2)
else:
  odd=nums[::2]
  even=nums[1::2]
  o=Counter(odd)
  e=Counter(even)
  ans=n-o.most_common()[0][1]-e.most_common()[0][1]
  if o.most_common()[0][0]==e.most_common()[0][0]:
    print(ans+min(o.most_common()[0][1]-o.most_common()[1][1],e.most_common()[0][1]-e.most_common()[1][1]))
  else:  
    print(ans)
n = int(input())
def get_h(pos,cx,cy,H):
  r= H - abs(pos[0]-cx) - abs(pos[1]-cy)
  return r

points = []
for i in range(n):
  x,y,h = map(int,input().split())
  if h == 0:
    continue
  points.append([x,y,h])
  
ans = []
if ans == []:
  for i in range(101):
    for j in range(101):
      d = get_h(points[0],i,j,0)- get_h(points[1],i,j,0)
      if points[0][2]- points[1][2] == d:
        ans.append([i,j])
for k in range(len(points)):
  for l in range(k+1,len(points)):
    for elem in ans[:]:
      i = elem[0]
      j = elem[1]
      if points[k][2] - points[l][2] != abs(points[l][0]-i) + abs(points[l][1]-j)- abs(points[k][0]-i)-abs(points[k][1]-j):
        ans.remove(elem)
if len(ans) > 1:
  ans.remove(ans[0])
h = abs(points[0][0]-ans[0][0])+abs(points[0][1]-ans[0][1]) + points[0][2]
print('{} {} {}'.format(ans[0][0],ans[0][1],h))

### FIXED CODE ###

n = int(input())
hist = [tuple(map(int,input().split())) for _ in range(n)]
hist.sort(key=lambda x: x[2], reverse=1)

cands = []
x0,y0,h0 = hist[0]

for i in range(0,101):
  for j in range(0,101):
    if h0 == 0:
      cands.append((i,j,1))
    else:
      cands.append((i,j, h0+abs(i-x0)+abs(j-y0)))
    
for X,Y,H in cands:
  for x,y,h in hist:
    if max(H-abs(X-x)-abs(Y-y),0) == h:
      continue
    else:
      break
  else:
    print(X,Y,H)
    break
def func(a):
    result = 0
    
    while a != 0:
        result += a%10
        a = int(a/10)
        
    if result == 1:
        print '10'
    else:
        print result

a=int(input())
func(a)
        

### FIXED CODE ###

a = int(input())

def func(a):
    digits = []
    temp = a
    while temp != 0:
        digits.append(temp%10)
        temp = int(temp/10)
    result = sum(digits)
    if result == 1:
        print('10')
    else:
        print(result)

func(a)
from itertools import permutations

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

for i in range(n) :
    _a, _b = map(int, input().split())
    paths.add((_a, _b))
    paths.add((_b, _a))
    
print(sum(all(s in paths for s in zip((1,) + p, p)) for p in permutations(range(2, n + 1))))



### FIXED CODE ###

from itertools import permutations

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

for i in range(m) :
    _a, _b = map(int, input().split())
    paths.add((_a, _b))
    paths.add((_b, _a))
    
print(sum(all(s in paths for s in zip((1,) + p, p)) for p in permutations(range(2, n + 1))))
k = input()
s = input()
i = 0
l = int(k)

while i < l:
	print(s[i])
    i = i + 1

### FIXED CODE ###

k = input()
s = input()
i = 0
l = int(k)
p = str()
 
while i < l and len(s) > l:
    p = p + s[i]
    i = i + 1
while i < len(s) and len(s) <=l:
    p = p + s[i]
    i = i + 1
if len(s) > l:
	print(p + '...')
else:
	print(p)
import sys

#N=sys.argv[1]
#te=sys.argv[2:]

N=raw_input()
te=raw_input()

flaglist=[]
for i in range(len(te)):
    if te[i]=="P" or te[i]=="p":
        if te[i]  not in flaglist:
            flaglist.append(te[i])
    if te[i]=="W" or te[i]=="w":
        if te[i]  not in flaglist:
            flaglist.append(te[i])
    if te[i]=="G" or te[i]=="g":
        if te[i]  not in flaglist:
            flaglist.append(te[i])
    if te[i]=="Y" or te[i]=="y":
        if te[i]  not in flaglist:
            flaglist.append(te[i])
            
if len(flaglist)==3:
    print("Three")
elif len(flaglist)==4:
    print("Four")


### FIXED CODE ###

import sys



N=raw_input()
te=raw_input()

flaglist=[]
for i in range(len(te)):
    if te[i]=="P" or te[i]=="p":
        if te[i]  not in flaglist:
            flaglist.append(te[i])
    if te[i]=="W" or te[i]=="w":
        if te[i]  not in flaglist:
            flaglist.append(te[i])
    if te[i]=="G" or te[i]=="g":
        if te[i]  not in flaglist:
            flaglist.append(te[i])
    if te[i]=="Y" or te[i]=="y":
        if te[i]  not in flaglist:
            flaglist.append(te[i])
            
if len(flaglist)==3:
    print("Three")
elif len(flaglist)==4:
    print("Four")
l = map(int, input().split())
a=list(l)
print(a[2]-(a[3]-a[1]), a[3]+a[2]-a[0], a[1]-(a[3]-a[1]), a[1]+a[2]-a[0])


### FIXED CODE ###

N= int(input())
print(N//2 * (N-N//2))
n,k = map(str, input().split())
s = str(input()) 

k_lower = s[:k-1]+s[k-1].lower()+s[k:]
print(k_lower)

### FIXED CODE ###

n,k = map(int, input().split())
s = str(input()) 

print(s[:k-1]+s[k-1].lower()+s[k:])
a = map(int, input().split())
n = sum(a)
if a < 22:
  print('win')
else:
  print('burst')

### FIXED CODE ###

a = map(int, input().split())
if sum(a) <= 21:
    print('win')
else:
    print('bust')
import math
import bisect
import numpy as np

x_minA = math.ceil(100 / 8 * A)
x_minB =  10 * B
x_maxA = math.floor(100 / 8 * (A+1))
x_maxB = 10 * (B+1)
if x_minA > x_maxB or x_minB > x_maxA:
  print(-1)
else:x_min = max(x_minA, x_minB)
  x_max = min(x_maxA, x_maxB)
  tansaku = np.array(range(max(x_minA, x_minB), min(x_maxA, x_maxB)+1))
  insert_index_a = bisect.bisect_left(tansaku*8/100-A,1)
  insert_index_b = bisect.bisect_left(tansaku/10-B,1)
  print(int(tansaku[min(insert_index_a, insert_index_b)]))

### FIXED CODE ###

import math
 
A, B = list(map(int, input().split()))
x_minA = math.ceil(100 / 8 * A)
x_minB =  10 * B
x_maxA = math.floor(100 / 8 * (A+1))
x_maxB = 10 * (B+1)
if x_minA > x_maxB or x_minB > x_maxA:
  print(-1)
else:
  for x in range(max(x_minA, x_minB), min(x_maxA, x_maxB)+1):
    if int(x * 8 / 100) == A and int(x / 10)==B:
      print(x)
      break
  else:
    print(-1)
N = int(input())
A = list(map(int, input().split()))

ANSWER = []
for i in range(N):
    A_ = A.copy()
    del A_[i]
    unique_i = list(set(A_))

    answer_i = 0
    for j in unique_i:
        answer_i += (A_.count(j) * (A_.count(j)-1)/2)
    
    ANSWER.append(int(answer_i))

for i in ANSWER:
    print(i)

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
import numpy as np
 
N = int(readline())
A = np.array(read().split(), np.int64)
counter = np.bincount(A)
 
total = (counter * (counter - 1)).sum() // 2
answer = (total - (counter - 1))[A]
 
print('\n'.join(answer.astype(str)))
n = int(input())
d = int(input())
i = (d * 2) + 1
if n % i == 0 :
  print(n / i)
else :
  print(n // i) + 1

### FIXED CODE ###

n, d = map(int, input().split())
i = (d * 2) + 1
if n % i == 0 :
  print(n // i)
else :
  print((n // i) + 1)
sx, sy, tx, ty=map(int,inpu().split())

dx=tx-sx
dy=ty-sy
d={0:'R', 1:'U', 2:'L', 3:'D'}
dirc=[dx,dy,dx,dy]

s=''
for j in range(4):
  s+=d[j]*(dirc[j]+i)
s+='D'
for j in range(2):
  s+=d[j]*(dirc[j]+1)
s+='L'
s+='U'
for j in range(2):
  s+=d[j+2]*(dirc[j+2]+1)
s+='R'
print(s)

### FIXED CODE ###

sx, sy, tx, ty=map(int,input().split())

dx=tx-sx
dy=ty-sy
d={0:'R', 1:'U', 2:'L', 3:'D'}
dirc=[dx,dy,dx,dy]

def path(sign,x,y,z,w):
  return d[sign+1]*abs(z-x) + d[sign+2]*abs(y-w)

s=''
s+='R'
s+=path(-1, sx+1, sy, tx, ty-1)
s+='UU'
s+=path(1, tx,ty+1,sx-1,sy)
s+='RD'
s+=path(-1, sx,sy-1,tx+1,ty)
s+='LL'
s+=path(1, tx-1,ty,sx,sy+1)
s+='D'
print(s)
# -*- coding: utf-8 -*-

def search(values,hp,vp,item):
	if not (0<=hp<len(values)): return
	if not (0<=vp<len(values[hp])): return
	if item!=values[hp][vp]: return
	values[hp][vp]=True
	search(values,hp-1,vp,item)
	search(values,hp+1,vp,item)
	search(values,hp,vp-1,item)
	search(values,hp,vp+1,item)

def solve(values):
	count=0
	for i in range(len(values)):
		for j in range(len(values[i])):
			if values[i][j] in ['@','#','*']:
				search(values,i,j,values[i][j])
				count+=1
	return count

def main():
	line,values=input().strip(),list()
	while line!='0 0':
		H,W = list(map(int,line.split(' ')))
		value = list()
		for _ in range(H):
			value.append(list(x for x in input().strip()))
		values.append(value)
		line = input().strip()
	for value in values:
		print(solve(value))

if __name__=='__main__':
	main()

### FIXED CODE ###

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

import sys
sys.setrecursionlimit(10**6)

def search(field,hp,vp,item):
	if not (0<=hp<len(field)): return
	if not (0<=vp<len(field[hp])): return
	if item!=field[hp][vp]: return
	field[hp][vp]=True
	for dh,dv in [[0,1],[0,-1],[1,0],[-1,0]]:
		search(field,hp+dh,vp+dv,item)
#	search(field,hp-1,vp,item)
#	search(field,hp+1,vp,item)
#	search(field,hp,vp-1,item)
#	search(field,hp,vp+1,item)

def solve(field):
	count,valid_items=0,set(['@','#','*'])
	for i in range(len(field)):
		for j in range(len(field[i])):
			if field[i][j] in valid_items:
				search(field,i,j,field[i][j])
				count+=1
	return count

def main():
	line = input().strip()
	while line!='0 0':
		H,W = list(map(int,line.split(' ')))
		field = list()
		for _ in range(H):
			field.append(list(input().strip()))
		print(solve(field))
		line = input().strip()

if __name__=='__main__':
	main()
x,y = input().split()

if x*4<y and y%2 ==0:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

x,y = input().split()
 
x=int(x)
y=int(y)
count = 0
for i in range(x+1):
  if 2*i+4*(x-i) == y:
    print("Yes")
    count = 1

if count == 0:
	print("No")