Harryxun/stf_run huggingface dataset:
n,m=map(int,input().split())
student=[list(map(int,input().split())) for i in range(n)]
point=[list(map(int,input().split())) for i in range(n)]
for a,b in student:
  length=10**10
  pn=0
  for j in range(m):
    c,d=point[j]
    if abs(a-c)+abs(b-d)<length:
      length=abs(a-c)+abs(b-d)
      pn+=1
  print(pn)

### FIXED CODE ###

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

for a,b in student:
  length=10**10
  pn=0
  for j in range(m):
    c,d=point[j]
    if abs(a-c)+abs(b-d)<length:
      length=abs(a-c)+abs(b-d)
      pn=1+j
  print(pn)
h,w=map(int,input().split())
box=[["."]+list(input())+["."] for i in range(h)]
box.insert(0,["."]*(w+2))
box.append(["."]*(w+2))

def seek(box,i,j):
    if box[i][j]=="#":
        for x,y in [[1,0],[-1,0],[0,1],[0,-1]]:
            xx=x+i
            yy=y+j
            if box[xx][yy]=="#" or box[xx][yy]=="O":
                box[i][j]="O"
                seek(box,xx,yy)
    return box

for i in range(1,h+1):
    for j in range(1,w+1):
        seek(box,i,j)

for i in range(1,h+1):
    for j in range(1,w+1):
        if box[i][j]=="#":
            print("No")
            exit()

print("Yes")

### FIXED CODE ###

H, W = map(int, input().split())
s = [input() for i in range(H)]
for i in range(H):
    for j in range(W):
        if s[i][j] == ".":
            continue
        if i == 0 or s[i-1][j] == "#":
            continue
        if i == H-1 or s[i+1][j] == "#":
            continue
        if j == 0 or s[i][j-1] == "#":
            continue
        if j == W-1 or s[i][j+1] == "#":
            continue
        print("No")
        exit()
print("Yes")
import math
n = int(input())
A,B = map(int,input().split())
for _ in range(n-1):
  a,b = map(int,input().split())
  m = max(math.ceil(A/a), math.ceil(B/b))
  A,B = A * m, B * m
print(A+B)

### FIXED CODE ###

n = int(input())
A,B = map(int,input().split())
for _ in range(n-1):
    a,b = map(int,input().split())
    aa = 0
    bb = 0
    if A % a == 0:
        aa = A // a
    else:
        aa = A // a + 1
    if B % b == 0:
        bb = B // b
    else:
        bb = B // b + 1
    m = max(aa, bb)
    A,B = a * m, b * m
print(A+B)
the_string = raw_input()
name, age = the_string.split()
print(age+name)

### FIXED CODE ###

the_string = raw_input()
S, T = the_string.split()
print(T.strip()+S.strip())
import math

prime = {}

N = int(input())

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

isPrime = [True]*(N+1)
isPrime[0] = False
isPrime[1] = False
for i in range(2,int(math.sqrt(N))+2):
    if isPrime[i]:
        n = 2*i
        while n<=N:
            isPrime[n] = False
            n += i

for i in range(N+1):
    if isPrime[i]:
        prime[i] = 0

key_list = list(prime.keys())

for num in range(2,N+1):
    res = num
    idx = 0
    while res>1:
        k = key_list[idx]
        if res%k == 0:
            prime[k] += 1
            res = res//k
        else:
            idx += 1
    
ans = 1
for v in prime.values():
    ans *= (v+1) 
    ans = ans % (10**9+7)
    if ans==0:
        ans = 1
    
print(ans)
    

### FIXED CODE ###

import sys
stdin = sys.stdin

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

a,b,c,d = li()

if a*b < c*d:
    print(c*d)
else:
    print(a*b)
a,b,m = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = [tuple(map(int,input().split())) for i in range(m)]
p = [min(a)+min(b)]
for t in c:
    p.append((p,a[t[0]-1]+b[t[1]-1]-t[2])
print(min(p))

### FIXED CODE ###

a,b,m = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = [tuple(map(int,input().split())) for i in range(m)]
p = min(a)+min(b)
for t in c:
    p = min(p,a[t[0]-1]+b[t[1]-1]-t[2])
print(p)
n = int(input())
print((n*(n+1)/2)

### FIXED CODE ###

n = int(input())
ans = 0
for i in range(1,n+1):
  ans += i

print(ans)
from math import floor, sqrt

print(floor(sqrt(int(input())) ** 2)

### FIXED CODE ###

from math import floor, sqrt

print(floor(sqrt(int(input()))) ** 2)
from collections import deque
import numpy as np
n,k = map(int,input().split())
a = list(map(int,input().split()))
roop_find = deque([0])
i = 0
count = 0
while a[i]-1 not in roop_find:
    roop_find.append(a[i]-1)
    i = a[i] - 1
    count += 1
    if count == k:
        print(i + 1)
        break
    else:
        pass
if b < k:
    b = roop_find.index(a[i]-1)
    roop = list(roop_find)[b:count+1]

    k -= b
    e = k % (count+1-b)
    print(roop[e]+1)


### FIXED CODE ###

n,k = map(int,input().split())
a = list(map(int,input().split()))
pos = 0
visit = [0] * n
move = []
loop = []
while visit[pos] != 2:
    if visit[pos] == 0:
        move.append(pos)
    else:
        loop.append(pos)
    visit[pos] += 1
    pos = a[pos] - 1
if len(move) > k:
    print(move[k]+1)
else:
    print(loop[(k-(len(move)-len(loop)))%len(loop)]+1)
#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys;input = sys.stdin.readline
inp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]

n = inp()
s = input().strip()
if s.count('W') in [0,n]:
    print(0)
    exit()
ans = n
w,r = 0,s.count('R')
for i in range(n):
    if s[i] == 'W':
        w += 1
    elif s[i] == 'R':
        r -= 1
    ans = max(ans,min(w,r))
#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys;input = sys.stdin.readline
inp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]

n = inp()
s = input().strip()
l,r = 0,n-1
ct = 0
if s.count('W') in [0,n]:
    print(ct)
    exit()
while l < r:
    while s[l] == 'R':
        if l >= r:
            break
        l += 1
    while s[r] == 'W':
        if l >= r:
            break
        r -= 1
    ct += 1
    l += 1
    r -= 1
print(min(ct,s.count('R'),s.count('W')))



### FIXED CODE ###

#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys;input = sys.stdin.readline
inp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]

n = inp()
s = input().strip()
print(s[:s.count('R')].count('W'))
X = int(input())
# X = 1

B = 0
while(True):
    B5 = B**5
    C5 = (-B)**5
    A5 = (X + B5)**0.2
    A5r = (X + C5)**0.2
    if A5 == round(A5,0):
        print (int(A5), int(B5))
        break
    if A5r ==  round(A5r,0):
        print (int(A5r), int(C5))
        break
    B += 1
    

### FIXED CODE ###

X = int(input())
# X = 1
stopFlag = 0
for i in range (-201, 201):
    a = i
    for j in range(-201, 201):
        if a**5 - j**5 == X:
            print (a, j)
            stopFlag = 1            
        if stopFlag:
            break
    if stopFlag:
        break
N = int(input())						# 5
#a = [int(i) for i in input().split()]	# 1 2 3 4 5 ...
s = "0 " + input()
a = [int(i) for i in s.split()]	# 1 2 3 4 5 ...

N = len(a)
#print(a)

ans = 0
bSkip = False

for i in range(N):
	if i==0: continue;
	if bSkip:
		bSkip = False
		continue;
#	print(i, a[i])
	
	if i==a[i]:
		ans += 1
		if(i<N):
			if(i+1)==a[i+1]:
				bSkip = True

print(ans)


### FIXED CODE ###

N = int(input())						# 5

s = "0 " + input()
a = [int(i) for i in s.split()]	# 1 2 3 4 5 ...


ans = 0
bSkip = False

for i in range(N+1):
	if i==0: continue;
	if bSkip:
		bSkip = False
		continue;
#	print(i, a[i])
	
	if i==a[i]:
		ans += 1
		if(i<N):
			if(i+1)==a[i+1]:
				bSkip = True

print(ans)
import numpy as np

N = int(input())
D = list(map(int, input().split()))
D = np.array(D)
D = np.sort(D)

if D[0] != 0:
    print(0)
elif sum(D == 0) != 1:
    print(0)
elif sum(np.diff(np.array(list(set(D)))) != 1):
    print(0)
else:
    print(np.prod(D[1:]) % 998244353)

### FIXED CODE ###

N = int(input())

if N % 2 == 0:
    print(N//2 -1)
else:
    print(N//2)
input_str = row_input()

translate_num = (int("input_str"))**

print("translate_num\n")

### FIXED CODE ###

input_str = input()

translate_num = (int(input_str))**3

print(translate_num)
N = str(input())
if N in 7:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

import sys
A = 1
N = str(input())
for i in N:
  if int(i) == 7:
    print("Yes")
    exit()
  else:
    A = 0
    
if A == 0:
  print("No")
itertools import chain
  
n = int(input())
ts = list(map(int, input().split()))
vs = list(map(int, input().split()))
  
va = list(chain.from_iterable([v] * (2 * t) for t, v in zip(ts, vs)))
va = [min(v1, v2) for v1, v2 in zip([0] + va, va + [0])]
lt = len(va)
  
pv = 0
for ct in range(1, lt):
    va[ct] = pv = min(va[ct], pv + 0.5)
  
pv = 0
for ct in range(lt - 1, 0, -1):
    va[ct] = pv = min(va[ct], pv + 0.5)
  
print(sum((v1 + v2) / 4 for v1, v2 in zip(va, va[1:])))

### FIXED CODE ###

from itertools import chain
  
n = int(input())
ts = list(map(int, input().split()))
vs = list(map(int, input().split()))
  
va = list(chain.from_iterable([v] * (2 * t) for t, v in zip(ts, vs)))
va = [min(v1, v2) for v1, v2 in zip([0] + va, va + [0])]
lt = len(va)
  
pv = 0
for ct in range(1, lt):
    va[ct] = pv = min(va[ct], pv + 0.5)
  
pv = 0
for ct in range(lt - 1, 0, -1):
    va[ct] = pv = min(va[ct], pv + 0.5)
  
print(sum((v1 + v2) / 4 for v1, v2 in zip(va, va[1:])))
N, M = map(int, input().split())

D = {}
for i in range(M):
  a, b = map(int, input().split())
  D[a] = b

print ("POSSIBLE" if D[D[1]] == N else "IMPOSSIBLE")

### FIXED CODE ###

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

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

D1 = set(A[i][1] for i in range(M) if A[i][0] == 1)
D2 = set(A[i][0] for i in range(M) if A[i][1] == N)

if len(D1 & D2) != 0:
  print ("POSSIBLE")
else:
  print ("IMPOSSIBLE")
N, K = map(int, input().split())
ex = list(map(lambda x: (int(x) + 1) / 2, input().split()))
if K == 1:
    print(max(ex))
    exit()
sums = []
for i in range(N - K + 1):
    sums.append(sum(P[i:i + K]))
print(max(sums))


### FIXED CODE ###

import numpy as np

N, K = map(int, input().split())
E = list(map(lambda x: (int(x) + 1) / 2, input().split()))

res = np.cumsum(E)

ans = res[K - 1]
for i in range(K, N):
    if ans < res[i] - res[i - K]:
        ans = res[i] - res[i - K]
print(ans)
n, m = map(int,input().split())
a = list(int(input()) for _ in range(m))
dp = [[] for _ in range(n + 1)]
dp[0] = 1
# j = 0
if a[0] == 1:
    dp[1] = 0
    j = 1
else:
    dp[1] = 1
    j = 0
for i in range(2, n + 1):
    # print(i, dp)
    if j < m:
        if a[j]  == i:
            dp[i] = 0
            j += 1
            continue
    dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
print(dp[n])

### FIXED CODE ###

n, m = map(int,input().split())
a = list(int(input()) for _ in range(m))
dp = [[] for _ in range(n + 1)]
dp[0] = 1
# j = 0
if m == 0:
    dp[1] = 1
    for i in range(2, n + 1):
        dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
    print(dp[n])
    exit()
if a[0] == 1:
    dp[1] = 0
    j = 1
else:
    dp[1] = 1
    j = 0
for i in range(2, n + 1):
    # print(i, dp)
    if j < m:
        if a[j]  == i:
            dp[i] = 0
            j += 1
            continue
    dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
print(dp[n])
# import numpy as np
h,w = map(int,input().split())
field = []
accum=[[0 for i in range(w)] for j in range(h)]
accumrev=[[0 for i in range(w)] for j in range(h)]
stack = [[0 for i in range(w)] for j in range(h)]
stackrev = [[0 for i in range(w)] for j in range(h)]

for i in range(h):
    field.append(list(input()))
field = np.array(field)

for i in range(h):
    s = field[i]
    temp = 0
    for j in range(w):
        if s[j] == "#":
            accum[i][j] = 0
            temp = 0
        else:
            temp += 1
            accum[i][j] = temp
    accum[i][-1] = temp
for i in range(h):
    s = field[i]
    temp = 0
    for j in range(1,w+1):
        if s[-j] == "#":
            accumrev[i][-j] = 0
            temp = 0
        else:
            temp += 1
            accumrev[i][-j] = temp
    accumrev[i][0] = temp
# print(field)
# print(np.array(accum))
# print(np.array(accumrev))

nf = list(zip(*field))

for i in range(w):
    s = nf[i]
    temp = 0
    for j in range(h):
        if s[j] == "#":
            stack[j][i] = 0
            temp = 0
        else:
            temp += 1
            stack[j][i] = temp
    stack[-1][i] = temp

for i in range(w):
    s = nf[i]
    temp = 0
    for j in range(1,h+1):
        if s[-j] == "#":
            stackrev[-j][i] = 0
            temp = 0
        else:
            temp += 1
            stackrev[-j][i] = temp
    stackrev[0][i] = temp

# print(field)
# print(np.array(stack))
# print(np.array(stackrev))

# accum = np.array(accum)
# accumrev = np.array(accumrev)
# stack = np.array(stack)
# stackrev = np.array(stackrev)



ans = 0

for i in range(h):
    for j in range (w):
        temp = accum[i][j] + accumrev[i][j] + stackrev[i][j] + stack[i][j]-3
        if temp > ans:
            ans = temp
print(ans)



### FIXED CODE ###

import numpy as np

H,W = map(int, input().split())
s = [list(input()) for j in range(H)]
s = (np.array(s) == ".") * 1

L = np.zeros((H, W), dtype = int)
R = np.zeros((H, W), dtype = int)
U = np.zeros((H, W), dtype = int)
D = np.zeros((H, W), dtype = int)


for j in range(W):
    if j == 0:
        L[:,j] = s[:,j]
    else:
        L[:,j] = (L[:,j-1] + 1) * s[:,j]
        

for j in reversed(range(W)):
    if j == W-1:
        R[:,j] = s[:,j]
    else:
        R[:,j] = (R[:,j+1] + 1) * s[:,j]


for i in range(H):
    if i == 0:
        U[i,:] = s[i,:]
    else:
        U[i,:] = (U[i-1,:] + 1) * s[i,:]

for i in reversed(range(H)):
    if i == H-1:
        D[i,:] = s[i,:]
    else:
        D[i,:] = (D[i+1,:] + 1) * s[i,:]

print(np.max(L + R + U + D - 3))
L,R=map(int,input().split())
l=L//2019
ll=L%2019
r=R//2019
lll=L//673
rrr=R//673
if l<r or ll==0:
  print(0)
elif lll>=1 and R-L>=3:
  print(0)
else:
  print(ll*(ll+1))


### FIXED CODE ###

N,A,B=map(int,input().split())
print(min(N*A,B))
s = input()
#print(s)
#print(len(s))
ans = []
cnt = 0
for i in range(len(s)):
  #print(s[i])
  if (s[i] != 'A') and (s[i] != 'T') and (s[i] != 'C') and (s[i] != 'G'):
    ans.append(cnt)
    #print(ans)
    cnt = 0
  elif s[i] == 'A':
    cnt += 1
    continue
  elif s[i] == 'T':
    cnt += 1
    continue
  elif s[i] == 'C':
    cnt += 1
  elif s[i] == 'G':
    cnt += 1
print(max(ans))

### FIXED CODE ###

s = input()
#print(s)
#print(len(s))
s = s+'X'
ans = []
cnt = 0
for i in range(len(s)):
  #print(s[i])
  if (s[i] != 'A') and (s[i] != 'T') and (s[i] != 'C') and (s[i] != 'G'):
    ans.append(cnt)
    #print(ans)
    cnt = 0
  elif s[i] == 'A':
    cnt += 1
    continue
  elif s[i] == 'T':
    cnt += 1
    continue
  elif s[i] == 'C':
    cnt += 1
  elif s[i] == 'G':
    cnt += 1

#print(ans)
print(max(ans))
S=str(input())
c=['Sunny','Cloudy','Rainy','Sunny']
for i,n in enumerate(c[:3]):
  if S==n:
    print(c[i+1])
	break

### FIXED CODE ###

S=input()
c=['Sunny','Cloudy','Rainy','Sunny']
for i,n in enumerate(c[:3]):
    if S==n:
        print(c[i+1])
        break
a,b =map(int, input().split())
print(max[a+b, a-b, a*b])

### FIXED CODE ###

a,b = map(int, input().split())
c=a+b
d=a-b
e=a*b
print(max(c, d, e))
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import floyd_warshall

n = int(readline())
memo_graph = [list(map(int, readline().split())) for _ in range(n)]
cost = floyd_warshall(csr_matrix(memo_graph))
cnt_1 = 0
cnt_2 = 0
for i in range(n):
    for j in range(n):
        if int(cost[i][j]) != memo_graph[i][j]:
            print(-1)
            exit()
        if cost[i][j] == 0:
            continue
        cnt_1 += cost[i][j]
s = set()
for k in range(n):
    for i in range(n):
        for j in range(n):
            # 3頂点が異なってかつ、経由のが近い場合は直接の辺は不要
            if i != j and j != k and k != i and cost[i][k] + cost[k][j] == cost[i][j]:
                if (i, j) not in s:
                    s.add((i, j))
                    cnt_2 += cost[i][j]
print((cnt_1 - cnt_2) // 2)


### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

import numpy as np

n = int(readline())
graph = np.array([list(map(int, readline().split())) for _ in range(n)])
inf = 10 ** 10
ans = 0
for i in range(n):
    graph[i][i] = inf
for i in range(n):
    for j in range(i + 1, n):
        v = np.min(graph[i] + graph[j])
        if graph[i][j] > v:
            print(-1)
            exit()
        elif graph[i][j] < v:
            ans += graph[i][j]
print(ans)
a, b = int(input().split())
if a + b >= 10:
  print("error")
else:
  print(a + B)

### FIXED CODE ###

a, b = map(int, input().split())
if a + b >= 10:
  print("error")
else:
  print(a + b)
pi = 3.1415926535
r = int(input())
print("{:.6f} {:.6f}".format(2 * pi * r, pi * r ** 2))



### FIXED CODE ###

from math import pi
r = float(input())
print("{:.6f} {:.6f}".format(pi * r ** 2, 2 * pi * r))
# -*- coding: utf-8 -*-
import math


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

lcm = C * D // math.gcd(C, D)

maxC = B // C
maxD = B // D
maxlcm = B // lcm

minC = (A-1) // C
minD = (A-1) // D
minlcm = (A-1) // lcm

lcmB = (maxC + maxD - maxlcm)
lcmA = (minC + minD - minlcm)

print(lcmB)
print(lcmA)
print((B-A+1)-(lcmB-lcmA))

### FIXED CODE ###

# -*- coding: utf-8 -*-
import fractions

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

lcm = C * D // fractions.gcd(C, D)

maxC = B // C
maxD = B // D
maxlcm = B // lcm

minC = (A-1) // C
minD = (A-1) // D
minlcm = (A-1) // lcm

lcmB = (maxC + maxD - maxlcm)
lcmA = (minC + minD - minlcm)

print((B-A+1)-(lcmB-lcmA))
a,b=input().split()
b=list(b)
b.remove('.')
b=''.join(b)
a=int(a)
b=int(b)
c=a*b
c=list(str(c))
c.insert('.',len(c)-3)
print(''.join(c))


### FIXED CODE ###

# coding: utf-8
# Your code here!

a,b=input().split()
b=list(b)
if a=="0" or b=="0":
    print(0)
else:
    b.remove('.')
    b=''.join(b)
    a=int(a)
    b=int(b)
    c=str(a*b)
    if a*b<100:
        print(0)
    else:
        c=list(c)
        del c[-1]
        del c[-1]
        c=''.join(c)
        print(c)
import heapq
n, q = map(int, input().split())
event = []
for _ in range(n):
    s, t, x = map(int, input().split())
    event.append((s-x, 1, x))
    event.append((t-x, -1, x))

event.sort(key=lambda y: y[0])
heap = []
xs = set([])

d = [int(input()) for _ in range(q)]
ans = [-1] * q
index = 0
for t, query, x in event:
    if d[index] < t:
        if not xs:
            pass
        else:
            while heap:
                tmp = heapq.heappop(heap)
                if tmp in xs:
                    heapq.heappush(heap, tmp)
                    ans[index] = tmp
                    break
        index += 1
        if index == q:
            break

    if query == 1:
        xs.add(x)
        heapq.heappush(heap, x)
    else:

        xs.remove(x)


print("\n".join(map(str, ans)))





### FIXED CODE ###

import heapq
n, q = map(int, input().split())
event = []
for _ in range(n):
    s, t, x = map(int, input().split())
    event.append((s-x, 1, x))
    event.append((t-x, -1, x))

event.sort()
heap = []
xs = set([])

d = [int(input()) for _ in range(q)] + [10**9 + 7]
ans = [-1] * q
index = 0
for t, query, x in event:
    while d[index] < t:
        if not xs:
            pass
        else:
            while heap:
                tmp = heapq.heappop(heap)
                if tmp in xs:
                    heapq.heappush(heap, tmp)
                    ans[index] = tmp
                    break
        index += 1

    if query == 1:
        xs.add(x)
        heapq.heappush(heap, x)
    else:
        xs.remove(x)


while index < q:
    while heap:
        tmp = heapq.heappop(heap)
        if tmp in xs:
            heapq.heappush(heap, tmp)
            ans[index] = tmp
            break
    index += 1

print("\n".join(map(str, ans)))
x,n = map(int, input().split())
a = []
for i in range(n):
    a.append(input())
c = -1
b = 0
d = 101
e = 0
for w in range(103):
  if c not in a:
    b = abs(x - c)
    if b < d:
      d = b
      e = c
      c += 1
    else:
      c += 1
  else:
    c += 1
print(e)

### FIXED CODE ###

x,n = map(int, input().split())
a = list(map(int,input().split()))
c = -1
b = 0
d = 101
e = 0
for w in range(103):
  if c not in a:
    b = abs(x - c)
    if b < d:
      d = b
      e = c
      c += 1
    else:
      c += 1
  else:
    c += 1
print(e)
I =[int(input())for i in range(5)]

if I[4] - I[0] > I[5] :
	print(":(")
else :
	print("Yay!")

### FIXED CODE ###

I =[int(input())for i in range(6)]

if I[4] - I[0] > I[5] :
	print(":(")
else :
	print("Yay!")
s = input()

n = int(s)
lst = list(map(int, list(s)))
lst_uniq = list(set(lst))
#lst_ans = [9] * (len(lst) - 1)

if lst_uniq == [9] or len(lst) == 1:
    ans = sum(lst)
elif lst[0] == 1:
    ans = 9 * (len(lst) - 1)
else:
    #lst_ans = [lst[0] - 1] + lst_ans
    ans = lst[0] - 1 + 9 : (len(lst) - 1)

print(ans)


### FIXED CODE ###

n = input()

lst = list(map(int, list(n)))
print(max(sum(lst), lst[0] - 1 + 9 * (len(lst) - 1)))
n = int(input())
line = input().split(" ")

s = line[0]
t = line[1]

for i in range(0, len(s)) 
	print(s[i], end="")
  	print(t[i], end="")


### FIXED CODE ###

n = int(input())
line = input().split(" ")
 
s = line[0]
t = line[1]
 
for i in range(0, len(s)): 
  print(s[i], end="")
  print(t[i], end="")
X, A, B = list(map(int, input().split()))

if A > B:
    ans = 'delicious'
elif B - A <= X:
    ans = 'safe'
else:
    'dangerous'

print(ans)


### FIXED CODE ###

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

if A >= B:
    ans = 'delicious'
elif B - A <= X:
    ans = 'safe'
else:
    ans = 'dangerous'

print(ans)
k, x = map(int, input().split())
if 500*k >= x:
  print("Yes")
  else:
    print("No")

### FIXED CODE ###

k, x = map(int, input().split())
if 500*k >= x:
  print("Yes")
else:
  print("No")
a,b,c=[int(x) for x in input().split()]
count = 0
for d in range(a,b+1)
    elif c%d == 0 : count += 1
print(count)


### FIXED CODE ###

a,b,c=[int(x) for x in input().split()]
count = 0
for d in range(a,b+1):
    if c%d == 0 : count += 1
print(count)
from scipy.special import comb
from sys import stdin
N = int(stdin.readline().rstrip())
A = [int(_) for _ in stdin.readline().rstrip().split()]
A.sort()
max_a = A[-1]
A.pop(N-1)
ans = 0
ans_a = 0
for a in A:
    tmp = comb(max_a, a, exact=True)
    if tmp > ans:
        ans = tmp
        ans_a = a
print(max_a, ans_a)

### FIXED CODE ###

from sys import stdin
N = int(stdin.readline().rstrip())
A = [int(_) for _ in stdin.readline().rstrip().split()]
A.sort()
max_a = A[-1]
print(max_a, min(A, key=lambda a:abs(max_a-a*2)))