Harryxun/stf_run huggingface dataset:
import sys
readline = sys.stdin.buffer.readline

from collections import deque
from copy import copy,deepcopy
from itertools import permutations,combinations
from pprint import pprint

def myinput():
    return map(int,readline().split())

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col):
    return data.sort(key=lambda x:x[col],reverse=True)

n = int(input())
xl = [ list(myinput()) for _ in range(n) ]

ls = []
for i in range(n):
    x = xl[i][0]
    l = xl[i][1]
    s = x - l
    e = x + l
    d= [s,e]
    ls.append(d)
# print(ls)
ls.sort(key=lambda x:x[1],reverse=False)
# print(ls)

count = 0
e = -1*float("inf")
for i in range(n):
    ns,ne = ls[i]
    if ns>=e:
        count += 1
        e = copy(ne)
    else:
        pass

print(count)

### FIXED CODE ###

import sys
readline = sys.stdin.buffer.readline

from collections import deque
from copy import copy,deepcopy
from itertools import permutations,combinations
from pprint import pprint

def myinput():
    return map(int,input().split())

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col):
    return data.sort(key=lambda x:x[col],reverse=True)

n = int(input())
xl = [ list(myinput()) for _ in range(n) ]
# print(xl)

ls = []
for i in range(n):
    x = xl[i][0]
    l = xl[i][1]
    s = x - l
    e = x + l
    d = [s,e]
    ls.append(d)
# print(ls)
ls.sort(key=lambda x:x[1],reverse=False)
# print(ls)

count = 0
e = -1*float("inf")
for i in range(n):
    ns,ne = ls[i]
    if ns>=e:
        count += 1
        e = copy(ne)
    else:
        pass

print(count)
import fractions
N = int(input())
l = list(map(int,input().split()))

g_list = []

if len(l) == 2:
  g_list.append(max(l[0],l[1]))
  
else:
    g = fractions.gcd(l[1],l[2])
    for j in range(3,N):
        if j != i:
            g = fractions.gcd(g,l[j])
    g_list.append(g)

    g = fractions.gcd(l[0],l[2])
    for j in range(3,N):
        if j != i:
            g = fractions.gcd(g,l[j])
    g_list.append(g)

    for i in range(N):
        g = fractions.gcd(l[0],l[1])
        for j in range(N):
            if j != i:
                g = fractions.gcd(g,l[j])
        g_list.append(g)

print(max(g_list))

### FIXED CODE ###

import fractions

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

L = [0]
R = [0]

gl = 0
gr = 0
for i in range(N):
    gl = fractions.gcd(gl,l[i])
    L.append(gl)
    gr = fractions.gcd(gr,l[N-1-i])
    R.append(gr)

M = []
for i in range(N+1):
    M.append(fractions.gcd(L[i-1],R[N-i]))

print(max(M))
n = int(input())

cnt = 0
for r in range(1, n):
    for a in range(1, (a // 2) +1):
        if r % a == 0:
            cnt += 1
print(cnt)

### FIXED CODE ###

n = int(input())

cnt = 0
for a in range(1, n):
    cnt +=(n -1)// a
print(cnt)
A, B, C = map(int, input().split())

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

### FIXED CODE ###

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

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

whie (true) :
    x = input().strip()
    if x == '0' :
        break;
    print('Case %s: %s'%(count,x))
    count = count + 1;

### FIXED CODE ###

count = 1

while True :
    x = input().strip()
    if x == '0' :
        break
    print('Case %s: %s'%(count,x))
    count = count + 1;
N_str, q_str = raw_input().split()
N = int(N_str)
q = in(q_str)
A =[]
B =[]
total =0

for i in N:
    t = raw_input().split()
    A.append([t[0],int(t[1])])

while A:
    name, time = A.pop(0)
    if time <= q:
        total += time
        B.append(name+" "+ str(total))
       
    else:
        time -= q
        total += q
        A.append([name, time])

print '\n'.join(B)

### FIXED CODE ###

N_str, q_str = raw_input().split()
N = int(N_str)
q = int (q_str)
A =[]
B =[]
total =0

for i in range(N):
    t = raw_input().split()
    A.append([t[0],int(t[1])])

while A:
    name, time = A.pop(0)
    if time <= q:
        total += time
        B.append(name+" "+ str(total))
       
    else:
        time -= q
        total += q
        A.append([name, time])

print '\n'.join(B)
n, x = [int(item) for item in input().split()]
if n == 1 or n == 2*n-1:
    print("No")
else:
    ans = [0] * (2*n - 1)
    used = [0] * (2*n - 1)
    if x >= n:
        ans[n-1] = 2*n-1
        used[2*n-1-1] = 1
        ans[n] = x
        used[x-1] = 1
        ans[n+1] = x-1
        used[x-2] = 1
        ans[n-2] = x-2
        used[x-3] = 1
    else:
        ans[n-1] = 1 
        used[0] = 1
        ans[n] = x
        used[x-1] = 1
        ans[n+1] = x+1
        used[x] = 1
        ans[n-2] = x+2
        used[x+1] = 1
    it = 0
    for i in range(2*n-1):
        if ans[i] == 0:
            while(used[it] != 0):
                it += 1
            ans[i] = it+1
            it += 1
    print("Yes")
    print(" ".join([str(item) for item in ans]))

### FIXED CODE ###

n, x = [int(item) for item in input().split()]
if x == 1 or x == 2*n-1:
    print("No")
    exit()

if n == 2:
    print("Yes")
    print("1 2 3")
    exit()

ans = [0] * (2*n - 1)
used = [0] * (2*n - 1)
if x >= n:
    ans[n-1] = 2*n-1
    used[2*n-1-1] = 1
    ans[n] = x
    used[x-1] = 1
    ans[n+1] = x-1
    used[x-2] = 1
    ans[n-2] = x-2
    used[x-3] = 1
else:
    ans[n-1] = 1 
    used[0] = 1
    ans[n] = x
    used[x-1] = 1
    ans[n+1] = x+1
    used[x] = 1
    ans[n-2] = x+2
    used[x+1] = 1
it = 0
for i in range(2*n-1):
    if ans[i] == 0:
        while(used[it] != 0):
            it += 1
        ans[i] = it+1
        it += 1
print("Yes")
print(" ".join([str(item) for item in ans]))
list = input().split()
n = len(list)

mae = [list[m] for m < n/2 ]

ushiro = [list[m] for m > n/2 ]

ema = [mae[n/2 - p] for p < n/2 ]

oroshi = [ushiro[-n/2 + p] for p > n/2 ]

if mae = ema and ushiro = oroshi:
  print(Yes)
  
else:
  print(No)


### FIXED CODE ###

li = input().split()
li[0] = int(li[0])  
li[1] = int(li[1])  
  
print( int(li[0]*(li[0]-1)/2 + li[1]*(li[1]-1)/2 ))
h,a = map(int,input().split())
for n in range(0,):
  if h - a*n <= 0
  exit()
print(n)

### FIXED CODE ###

h,a = map(int,input().split())
if h % a == 0:
  print(int(h/a))
else:
  print(int(h//a)+1)
N,H=map(int,input().split())
B=[]
A=0
for _ in range(N):
    a,b = map(int,input().split())
    A = max(A,a)
    B.append(b)
B = sorted(reverse=True) + [0]

i = 0
while B[i] >= A:
    i += 1
B = B[:i]

ans = 0
for i in range(len(B)):
    H -= B[i]
    ans += 1
    if H <= 0:
        print(ans)
        exit()
print(ans + (H -1)//A + 1)


### FIXED CODE ###

N,H=map(int,input().split())
B=[]
A=0
for _ in range(N):
    a,b=map(int,input().split())
    A=max(A,a)
    B.append(b)
B.sort(reverse=True)
ans=(H-1)//A+1
for i in range(N):
    H-=B[i]
    if H<=0:
        ans=min(ans,i+1)
        break
    ans=min(ans,(H-1)//A+1+i+1)
print(ans)
a,b,k=map(int,input()split())
ans = []
for i in range(a,a+k+1):
    if i>b:
        break
    ans.append(i)
for i in range(b,b-k-1,-1):
    if i<a:
        break
    ans.append(i)
ans = sorted(list(set(ans)))
for i in ans:
    print(ans)

### FIXED CODE ###

a,b,k=map(int,input().split())
ans = []
for i in range(a,a+k):
    if i>b:
        break
    ans.append(i)
for i in range(b,b-k,-1):
    if i<a:
        break
    ans.append(i)
ans = sorted(list(set(ans)))
for i in ans:
    print(i)
import math
def main(a,b,c):
    temp = math.sqrt(a) + math.sqrt(b)
    return "Yes" if math.sqrt(c) > temp else "No"

a,b,c = map(int, input().split())
print(main2(a,b,c))

### FIXED CODE ###

def main(a,b,c):
    if c-a-b < 0:
        return "No"
    else:
        if 4*a*b < (c-a-b)**2:
            return "Yes"
        else: return "No"

a,b,c = map(int, input().split())
print(main(a,b,c))
import math

n = int(input())
ans = (2*n) // math.gcd(2, n)
print(ans)

### FIXED CODE ###

import math

n = int(input())
if n%2 == 0:
    print(n)
else:
    print(2*n)
def main():
    n = int(input())
    r = [input() for i in range(n)]
    r.sort()
    counter = 0
    tmp = 0
    for i in range(n):
        if (r[i] > tmp):
            tmp = r[i]
            counter += 1
    print(counter)
main()

### FIXED CODE ###

def main():
    n = int(input())
    r = [int(input()) for i in range(n)]
    r.sort()
    counter = 0
    tmp = 0
    for i in range(n):
        if (r[i] > tmp):
            tmp = r[i]
            counter += 1
    print(counter)
main()
D,N=map(int,input().split())
if N==100:
    print(2/0)
print((100**D)*N)


### FIXED CODE ###

D,N=map(int,input().split())
if N==100:
    N+=1
print((100**D)*N)
# A - Darker and Darker
import numpy as np
from collections import deque

H,W = map(int,input().split())
B = np.full((H,W),-1,dtype=int)

queue = deque([])

for i in range(H):
    A = input()
    for j in range(W):
        if A[j]=='#':
            B[i][j] = 0
            queue.append((i,j))

while queue:
    I,J = queue.popleft()
    for i,j in ((I-1,J),(I+1,J),(I,J-1),(I,J+1)):
        if 0<=i<H and 0<=j<W:
            if B[i][j]<0:
                B[i][j] = B[I][J]+1
                queue.append((i,j))

print(np.max(B))

### FIXED CODE ###

# A - Darker and Darker
from collections import deque

H,W = map(int,input().split())
B = [[-1] * W for _ in range(H)]

queue = deque([])

for i in range(H):
    A = input()
    for j in range(W):
        if A[j]=='#':
            B[i][j] = 0
            queue.append((i,j))

ans = 0

while queue:
    I,J = queue.popleft()
    for di,dj in ((-1,0),(1,0),(0,-1),(0,1)):
        i,j = I+di,J+dj
        if 0<=i<H and 0<=j<W:
            if B[i][j]<0:
                B[i][j] = B[I][J]+1
                ans = max(ans,B[i][j])
                queue.append((i,j))

print(ans)
H = map(int, input().split())
enemy = 1
count = 0
while H >= 1:
  count += enemy
  enemy *= 2
  H //= 2
print(count)

### FIXED CODE ###

H = int(input())
enemy = 1
count = 0
while H >= 1:
  count += enemy
  enemy *= 2
  H //= 2
print(count)
n = int(input())
lst = list(map(int,input().split()))
mod = 10**9 + 7

col_lst = [0 , 0 , 0]
ans = 1

for i in range(n):
    tmp = lst[i]
    val = col_lst.count(tmp)
    ans = ans * val % mod
    col_lst[col_lst.index(tmp)] += 1
print(ans)

### FIXED CODE ###

n = int(input())
lst = list(map(int,input().split()))
mod = 10**9 + 7

col_lst = [0 , 0 , 0]
ans = 1

for i in range(n):
    tmp = lst[i]
    val = col_lst.count(tmp)
    if val == 0:
        print(0)
        exit()
    else:
        ans = (ans * val) % mod
        col_lst[col_lst.index(tmp)] += 1
print(ans % mod)
#! /usr/bin/env python
#-*- coding: utf-8 -*-

''' bubble sort '''

# O(n^2)


def bubble_sort(A, N):
    swap_num = 0  # the number of swap operations

    for i in range(N - 1):
        for j in range(N - 1, i, -1):
            if A[j] < A[j - 1]:
                # swap
                temp = A[j]
                A[j] = A[j - 1]
                A[j - 1] = temp
                swap_num += 1

    return (A, swap_num)


if __name__ == "__main__":
    N = input()
    A = map(int, raw_input().split())
    # A = [5, 2, 4, 6, 1, 3]
    # N = len(A)
    array_sorted, swap_num = bubble_sort(A, N)
    print(' '.join(map(str, array_sorted)))
    print(swap_num)

### FIXED CODE ###

#! /usr/bin/env python
#-*- coding: utf-8 -*-

''' ?????????????????? '''

# O(n^2)


def bubble_sort(A, N):
    swap_num = 0  # ?????????????????°

    for i in range(N - 1):
        for j in range(N - 1, i, -1):
            if A[j] < A[j - 1]:
                # swap
                temp = A[j]
                A[j] = A[j - 1]
                A[j - 1] = temp
                swap_num += 1

    return (A, swap_num)


if __name__ == "__main__":
    N = int(input())
    A = list(map(int, input().split()))
    # A = [5, 2, 4, 6, 1, 3]
    # N = len(A)
    array_sorted, swap_num = bubble_sort(A, N)
    print(' '.join(map(str, array_sorted)))
    print(swap_num)
h,w = map(int,input().split())
whole = [input() for _ in range(h)]
result = []
for hi in range(h):
  old = whole[hi]
  now = 0
  tmp = 0
  new = []
  while now < w:
    if old[now] == '#':
      new += [tmp]*tmp
      new += [0]
    else:
      tmp += 1
    now += 1
  new += [tmp]*tmp
  result.append(new)
print(result)
twhole = list(map(lambda x:[x],whole[0]))
print(twhole)
for hi in range(1,h):
  low = whole[hi]
  for wi in range(w):
    twhole[wi].append(h[wi])
print(twhole)

### FIXED CODE ###

#21:10
h,w = map(int,input().split())
raw = []
for x in range(h):
  raw.append(input())
xx = []
for x in range(h):
  now = []
  tmp = 0
  for y in range(w):
    if raw[x][y] == '.':
      tmp += 1
    else:
      now += [tmp] * tmp
      tmp = 0
      now.append(0)
  now += [tmp] * tmp
  xx.append(now)
yy = []
for y in range(w):
  now = []
  tmp = 0
  for x in range(h):
    if raw[x][y] == '.':
      tmp += 1
    else:
      now += [tmp] * tmp
      tmp = 0
      now.append(0)
  now += [tmp] * tmp
  yy.append(now)
'''
for x in range(h):
  print(xx[x])
for y in range(w):
  print(yy[y])
'''
maxi = 0
for x in range(h):
  for y in range(w):
    maxi = max(maxi,xx[x][y]+yy[y][x]-1)
print(maxi)
n,m = map(int, input().split())
wa = 0
ac = 0
ac_list = []
if m==0:
    print(0,0)
else:
    for i in range(m):
        p,s = input().split()
        if s=='WA' & ac_list.count(p) ==0:
            wa += 1
        elif ac_list.count(p) ==0:
            ac_list.append(p)
            ac += 1
        else:
            pass
    print(ac, wa)

### FIXED CODE ###

n,m = map(int, input().split())
wa = 0
ac_list = {'AC':{}, 'WA':{}}
if m==0:
    print(0,0)
else:
    for i in range(m):
        p,s = input().split()
        ac_list[s][p] = ac_list[s].get(p, 0) + 1* int(not(p in ac_list['AC'].keys()))
    kyotu_key = list(set(ac_list['AC'].keys()) & set(ac_list['WA'].keys()))
    wa_list = [ac_list['WA'][p] for p in kyotu_key]
    print(len(ac_list['AC'].keys()), sum(wa_list))
input_A = input()
input_B = input()

A = int(input_A)
B = int(input_B)

print((A-1)*(B-1))


### FIXED CODE ###

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

print((A - 1) * (B - 1))
i=list(map(int, input().split()))

if i[0]==i[1] | i[0]==i[2] | i[1]==i[2]:
  if i[0]==i[1] & i[0]==i[2]:
	print('No')
  else:
	print('Yes')
else:
    print('No')

### FIXED CODE ###

i=list(map(int, input().split()))
 
if i[0]==i[1] or i[0]==i[2] or i[1]==i[2]:
	if i[0]==i[1] and i[0]==i[2]:
		print('No')
	else:
		print('Yes')
else:
    print('No')
n,a,b = map(int,input().split())
ans = 0
for i in range(n+1):
  f = sum([int(x) for x in str(i)])
  if a <= f && f <= b:
    ans+=i
print(ans)   

### FIXED CODE ###

n,a,b = map(int,input().split())
ans = 0
for i in range(n+1):
  f = sum([int(x) for x in str(i)])
  if (a <= f) & (f <= b):
    ans+=i
print(ans)
import math


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


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

AtoB = (B - (A - 1))

divisible_C = (B // C) - ((A - 1) // C)
divisible_D = (B // D) - ((A - 1) // D)

minLcm = lcm(C, D)
divisible_CD = (B // minLcm) - ((A - 1) // minLcm)

divisible_CandD = (divisible_C + divisible_D) - divisible_CD

answer = AtoB - divisible_CandD

print(answer)

### FIXED CODE ###

import fractions


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


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

AtoB = (B - (A - 1))

divisible_C = (B // C) - ((A - 1) // C)
divisible_D = (B // D) - ((A - 1) // D)

minLcm = lcm(C, D)

divisible_CD = (B // minLcm) - ((A - 1) // minLcm)

divisible_CtoD = (divisible_C + divisible_D) - divisible_CD

answer = AtoB - divisible_CtoD

print(answer)
N, M = map(int, input().split())
Inf = 10**8
Dp = [Inf]*(2**N)
Dp[0] = 0
 
for i in range(M): #カギiで
    a,_=map(int, input().split())
    d = sum((1<<p-1) for p in list(map(int, input().split()))) #iで開けられる宝箱の2bit表記
    for j in range(2**N):
        ope = j|d
        Dp[ope] = min(Dp[ope], Dp[j] + a)
 
if Dp[-1] == Inf:
    print(-1)
else:

### FIXED CODE ###

N, M = map(int, input().split())
Inf = 10**8
Dp = [Inf]*(2**N)
Dp[0] = 0

for i in range(M): #カギiで
    a,_=map(int, input().split())
    c = list(map(int, input().split()))
    d = sum((1<<p-1) for p in c) #iで開けられる宝箱の2bit表記
    for j in range(2**N):
        ope = j|d
        Dp[ope] = min(Dp[ope], Dp[j] + a)

if Dp[-1] == Inf:
    print(-1)
else:
    print(Dp[-1])
import math 
n=input()
def d (n):
    return math.pi*2*n
  
print(d(n))

### FIXED CODE ###

import math
n=int(input())
def func(n):
    return math.pi*n*2
print(func(n))
s=input()
k=int(input())
cnt=1
temp=[]
for i in range(len(s)-1):
    if s[i]==s[i+1]: cnt+=1
    else:
        temp.append([s[i],cnt])
        cnt=1
if cnt>=1: temp.append([s[-1],cnt])
if len(temp)==1:
    print(k*len(s)//2)
    exit()
ans=0
if temp[0][0]!=temp[-1][0]:
    for pair in temp:
        if pair[1]!=1: ans+=pair[1]//2
    print(ans*k)
else:
    for pair in temp[1:-1]:
        if pair[1]!=1: ans+=pair[1]//2
    ans*=k
    ans+=(k-1)*((temp[0][0]+temp[-1][0])//2)
    ans+=temp[0][0]//2+temp[-1][0]//2
    print(ans)

### FIXED CODE ###

s=input()
k=int(input())
cnt=1
temp=[]
for i in range(len(s)-1):
    if s[i]==s[i+1]: cnt+=1
    else:
        temp.append([s[i],cnt])
        cnt=1
if cnt>=1: temp.append([s[-1],cnt])
if len(temp)==1:
    print(k*len(s)//2)
    exit()
ans=0
if temp[0][0]!=temp[-1][0]:
    for pair in temp:
        if pair[1]!=1: ans+=pair[1]//2
    print(ans*k)
else:
    for pair in temp[1:-1]:
        if pair[1]!=1: ans+=pair[1]//2
    ans*=k
    ans+=(k-1)*((temp[0][1]+temp[-1][1])//2)
    ans+=temp[0][1]//2+temp[-1][1]//2
    print(ans)
n,k = map(int, input().split())
p = [float(e) for e in input().split()]

e = [(q+1)/2 for q in p]

max = 0
for i in range(n-k+1):
  s = e[i]+e[i+1]+e[i+2]
  if max < s:
    max = s
    
print(max)


### FIXED CODE ###

n,k = map(int, input().split())
p = [int(e) for e in input().split()]
s = sum(p[0:k])
max = s
for i in range(n-k):
  s = s - p[i] + p[i+k]
  if max < s:
    max = s
    
ex = (max+k)/2.0
print(ex)
a = input()
b = 0
while a >= 0:
	a -= 2
    b += 1
    if a == 1:
      break
else:
	print(b)
print(b + 1)


### FIXED CODE ###

a = int(input())
b = 0
while a > 0:
  a -= 2
  b += 1
  if a == 1:
    print(b + 1)
    break
else:
  print(b)
a,b=map(int,input().split())
count=0
if b%a==0:
  print a//b
else:
  print a//b+1


### FIXED CODE ###

a,b=map(int,input().split())
c=0
d=1
while d<b:
  d=d+a-1
  c=c+1
  
print(c)
import sys
import math
import numpy as np

def main():
    dish = np.array(sys.stdin.read().split())

    minute = [int(dish[i][-1]) for i in range(5)]
    m = min(x for x in minute if x > 0) if 0 in minute else 10

    res = (np.ceil(dish.astype(np.int64) / 10) * 10).sum() - 10 + m

    print(int(res))

if __name__ == "__main__":
    main()


### FIXED CODE ###

# 2019-11-12 22:40:44(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# from scipy.misc import comb # float
# import numpy as np 

def main():
    dishes = [int(x) for x in sys.stdin.read().split()]
    

    total = 0
    for i in range(5):
        if dishes[i] % 10 != 0:
            total += (dishes[i] // 10 + 1) * 10
        else:
            total += dishes[i]
    

    remainder = [dishes[i] % 10 for i in range(5) if dishes[i] % 10 != 0]
    if remainder:
        ans = total - (10 - min(remainder))
    else:
        ans = total
    print(ans)

if __name__ == "__main__":
    main()
N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]

mod = int(1e9+7)

if N == 1:
  print(1)
  exit()

solver = [1]

## 1段目の処理
if A[0] == 1:
  solver.append(0)
else:
  solver.append(1)

for i in range(2,N+1): ## i段目の処理
  if i in A:
    solver.append(0)
  else:
    var = (solver[i-2] + solver[i-1]) % mod
    solver.append(var)
    
print(solver[-1])

### FIXED CODE ###

N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]

mod = int(1e9+7)

if N == 1:
  print(1)
  exit()

solver = [0]*(N+1)
solver[0] = 1

## 調べるべき階段のみ取り出す
stairs = set(range(2,N+1)) - set(A)

## 1段目の処理
if len(A) > 0 and A[0] == 1:
  solver[1] = 0
else:
  solver[1] = 1

for i in stairs: ## i段目の処理
    var = (solver[i-2] + solver[i-1]) % mod
    solver[i] = var
    
print(solver[-1])
s = input()
t = input()
g = []
for i in range(len(s)-len(t)):
  n = 0
  for j in range(len(t)):
    if s[i+j]==t[j]:
      n+=1
  g.append(len(t)-n)
print(min(g))

### FIXED CODE ###

s = input()
t = input()
if len(s) == len(t):
  a = 0
  for i in range(len(t)):
    if s[i] == t[i]:
      a+=1
  print(len(s)-a)
  exit(0)
g = []
for i in range(len(s)-len(t)):
  n = 0
  for j in range(len(t)):
    if s[i+j]==t[j]:
      n+=1
  g.append(len(t)-n)
print(min(g))
numA numB = input()
if(numA <=8 and numB <= 8):
    print('Yay!')
else:
    print(':(')


### FIXED CODE ###

numA,numB = map(int,input().split())
if(numA <=8 and numB <= 8):
    print('Yay!')
else:
    print(':(')
b = int(input())

enkitsui = {'A':'T','C':'G','T':'A','G':'C'}
print(enkitsui['b'])

### FIXED CODE ###

b = input()
enkitsui = {'A':'T','C':'G','T':'A','G':'C'}
print(enkitsui[b])
N,Q = [int(w) for w in input().split()]
i = 0
x = []
y = []
while i < N:
    a,b = [int(w) for w in input().split()]
    x.append(a)
    y.append(b)
    i +=1
for i in range(N):
    m = (x[i]**2 + y[i]**2)**(1/2)
    if  m <= Q:
        count += 1
    else:
        count += 0
print(count)ount = 0

### FIXED CODE ###

N,Q = [int(w) for w in input().split()]
i = 0
x = []
y = []
count = 0
while i < N:
    a,b = [int(w) for w in input().split()]
    x.append(a)
    y.append(b)
    i +=1
for i in range(N):
    m = (x[i]**2 + y[i]**2)**(1/2)
    if  m <= Q:
        count += 1
    else:
        count += 0
print(count)
import numpy as np
N, K = map(int, input().split())
A = [int(x) for x in input().split()]
bit_K = bin(K)
max_f = 0
for index in range(41,-2,-1):#range(1,len(bit_K))[::-1]:
   #d-bit目まではKと同じ
   #XがKより大きくならないように、上位ビットをKに合わせる。
    d=index-2
    if (d != -1 and not (K & 1 << d)):
        continue
    f=0
    for e in range(41,-1,-1):#range(2,len(bit_K))[::-1]:
        e=e-2
        mask = 1<<e
        num=0
        for a in A:#e-bit目が立っているA[i]を数える
            if a&mask:
                num+=1
        n_num = N - num
        #A[i]のe-bit目が立っていれば、XORの計算上0になるので、e-bit目が立っていないA[i]が加算
        if e>d:#dビット目より上はKに合わせる
            #以下、e-bit目だけ計算したf(x)
            if K&mask:
                f += mask*n_num
            else:
                f += mask*num
        elif e==d:
            f += mask*num
        else:#どうせ後から計算するからなんでもよい？
            f += mask*max(n_num,num)
    max_f = max(f,max_f)
print(max_f)

### FIXED CODE ###

import sys
input = sys.stdin.readline

N, K = map(int, input().split())
A = list(map(int, input().split()))
"""
N, K = map(int, input().split())
A = [int(x) for x in input().split()]
max_A = max(A)
bit = bin(K)
if max_A > K:
    bit = bin(max_A)"""
max_f = 0
#for d in range(1,len(bit))[::-1]:
for d in range(41,-2,-1):
    #d=d-2
    if (d != -1 and not (K & 1 << d)):
        continue
    f=0
    #for e in range(2,len(bit))[::-1]:
    for e in range(41,-1,-1):
        #e=e-2
        mask = 1<<e
        num=0
        for a in A:
            if a&mask:
                num+=1
        n_num = N - num
        if e>d:
            if K&mask:
                f += mask*n_num
            else:
                f += mask*num
        elif e==d:
            f += mask*num
        else:
            f += mask*max(n_num,num)
    max_f = max(f,max_f)
print(max_f)
import math
a, b = list(map(int, input().split()))
for i in range(1, 1250):
    p8 = math.floor(i * 0.08)
    p10 = math.floor(i * 0.10)
    if p8 == a and p10 == b:
        print(i)
        return
print(-1)

### FIXED CODE ###

import math
a, b = list(map(int, input().split()))
for i in range(1, 1250):
    p8 = math.floor(i * 0.08)
    p10 = math.floor(i * 0.10)
    if p8 == a and p10 == b:
        print(i)
        exit()
print(-1)