Harryxun/stf_run huggingface dataset:
W,H,x,y,r = map(int, input().split(','))

if x >= r and x<= W-r \
and y >= r and y <= H-r:
    print('Yes')
else:
    print('No')

    


### FIXED CODE ###

W,H,x,y,r = map(int, input().split())

if x >= r and x<= W-r \
and y >= r and y <= H-r:
    print('Yes')
else:
    print('No')
s,t=input().split()
if s==t:
  print(3)
elif s!=t:
  for i in range(3):
    if s[i]==t[i]:
      i+=1
      print(i)

### FIXED CODE ###

s = input()
t = input()
 
count = 0
 
for i in range(3):
		if s[i] == t[i]:
			count += 1  
    
print(count)
n, a = map(int, input().split())
Max = -1000000
Min = a
for i in range(n):
    x = int(input())
    if (Max < (x-Min)):
        Max = x-Min
    if (x < Min):
        Min = x
print(Max)

### FIXED CODE ###

n = int(input())
a = int(input())
Max = -10 ** 9
Min = a
for i in range(n-1):
    x = int(input())
    if (Max < x - Min):
        Max = x - Min
    if (x < Min):
        Min = x
print(Max)
X,Y,Z=map(int,input())
print(str(Z) + " " + str(X) + " " + str(Y))

### FIXED CODE ###

X,Y,Z=map(int,input().split())
print(str(Z)+" "+str(X)+" " + str(Y))
from itertools import combinations
N = int(input())
d = [list(map(int, input().split())) for _ in range(N)]

dd = dict()
t = 0

for n ,m in combinations(d, 2):
    if n[0] == m[0]:
        t += 1
    else:
        a = (m[1]-n[1])/(m[0]-n[0])
        if a in dd:
            dd[a] += 1
        else:
            dd.setdefault(a, 1)

M = max(t, *dd.values())
if M == 1:
    print(N-1)
else:
    for i in range(1, 51):
        if M == (i*(i+1))//2:
            M = i
            break
    print(N-M)


### FIXED CODE ###

N = int(input())
S = list(tuple(map(int, input().split())) for _ in range(N))
A = []
if N == 1:
    print(1)
else:
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            a, b = S[i]
            c, d = S[j]
            for k in range(len(A)):
                e, f, g = A[k]
                if e == a-c and f == b-d:
                    A[k] = (e, f, g+1)
                    break
            else:
                A.append((a-c, b-d, 1))
    print(N-max(list(x[2] for x in A)))
N = int(input())
z = 0
for a in range(N):
    for b in range(N):
        c = N - (a+1)*(b+1)
        if c > 0:
            z = z+1
        else:
            pass
print(z)

### FIXED CODE ###

s = input()
if s[-1]=="s":
    t = s + "es"
else:
    t = s + "s"
print(t)
import numpy as np

H,W = map(int,input().split())
A = []
for i in range(H):
    A.append([0 if i == "#" else H+W for i in list(input())])
A = np.array(A)

for i in range(H-1):
  A[i+1, :] = np.minimum(A[i, :] + 1, A[i+1, :])
for i in range(H-1,0,-1):
  A[i-1,:] = np.minimum(A[i,:]+1,A[i-1,:])
for i in range(W-1):
  A[:,i+1] = np.minimum(A[:,i]+1,A[:,i+1])
for i in range(W-1,0,-1):
  A[:,i-1] = np.minimum(A[:,i]+1,A[:,i-1])
print(np.max(A))


### FIXED CODE ###

import numpy as np

H,W = map(int,input().split())
A = []
for i in range(H):
    A.append([0 if i == "#" else H+W for i in list(input())])
A = np.array(A)

for i in range(H-1):
  A[i+1, :] = np.minimum(A[i, :] + 1, A[i+1, :])
for i in range(H-1,0,-1):
  A[i-1,:] = np.minimum(A[i,:]+1,A[i-1,:])
for i in range(W-1):
  A[:,i+1] = np.minimum(A[:,i]+1,A[:,i+1])
for i in range(W-1,0,-1):
  A[:,i-1] = np.minimum(A[:,i]+1,A[:,i-1])
print(np.max(A))
# coding: utf-8
# Your code here!
from collections import deque
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline #文字列入力のときは注意

n,m = [int(i) for i in readline().split()]

if m%2: print(-1); exit()

L = [0]*n

g = [set() for _ in range(n)]
for i in range(m):
    a,b = [int(i) for i in readline().split()]
    g[a-1].add(b-1)
    g[b-1].add(a-1)
    L[a-1] += 1
    L[b-1] += 1


used = [0]*m
def dfs(v):
    res = 0
    for c in g[v]:
#        if used[i] == 1: continue1
        if c-1 not in g[v-1]: g[v-1].remove(c-1)
        if v-1 not in g[c-1]: g[c-1].remove(v-1)
        p =  dfs(c)
        if p%2 == 1:
            print(v+1,c+1)
        else:    
            print(c+1,v+1)
        res += p
    return res+1


for i in range(n):
    dfs(i)
#print(q)












### FIXED CODE ###

# coding: utf-8
# Your code here!
from collections import deque
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline #文字列入力のときは注意

n,m = [int(i) for i in readline().split()]

if m%2: print(-1); exit()

#L = [0]*n

g = [[] for _ in range(n)]
for i in range(m):
    a,b = [int(i) for i in readline().split()]
    g[a-1].append((b-1,i))
    g[b-1].append((a-1,i))
#    L[a-1] += 1
#    L[b-1] += 1



used = [0]*m
usedp = [0]*n
def dfs(v):
    res = 0
    for (c,i) in g[v]:
        if used[i] == 1: continue
        used[i] = 1
        if usedp[c] == 1:
            res += 1
            print(v+1,c+1)
            continue
        usedp[c] = 1
        p =  dfs(c)
        if p%2 == 1:
            print(v+1,c+1)
        else:    
            print(c+1,v+1)
        res += p
    return res+1


for i in range(n):
    dfs(i)
#print(q)
import numpy as np
from functools import reduce
from operator import mul

def prod(arr):
    return reduce(mul, arr, 1)

def fancy(arr, index):
    output = []
    for i, v in enumerate(index):
        if v:
            output.append(arr[i])
    return output

def prime_factorize(n):
    answers = []
    while n % 2 == 0:
        answers.append(2)
        n //= 2
    f = 3
    while f**2 <= n:  # instead of f <= n**0.5
        if n % f == 0:
            answers.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        answers.append(n)
    return answers

N = int(input())
factors = prime_factorize(N)
selectors = [list(map(bool, map(int, list("{0:b}".format(i).zfill(len(factors)))))) for i in range(1, 2**len(factors))]
combinations = [(prod(fancy(factors, selector)), N//prod(fancy(factors, selector))) for selector in selectors]
distances = [combination[0]-1 + combination[1]-1 for combination in combinations]
print(min(distances))


### FIXED CODE ###

N = int(input())
minstep = 9999999999999999999999999999999
for i in range(1, int(N**0.5+1)):
  if N%i == 0:
    minstep = min(minstep, i+N//i-2)
print(minstep)
n=int(input())
for i in range(N):
    i = i + 1
    for j in range(N-i):
        j = i+j+1
        for k in range(9):
            if i % (2**(k+1)) != j % (2**(k+1)):
                print(k+1, end=" ")
                break
    print()


### FIXED CODE ###

N=int(input())
for i in range(N):
    i = i + 1
    for j in range(N-i):
        j = i+j+1
        for k in range(9):
            if i % (2**(k+1)) != j % (2**(k+1)):
                print(k+1, end=" ")
                break
    print()
N, M = map(int, input().split())
X = list(map(int, input().split()))
x = sorted(X)
B = []
for i in range(0, M-1):
	B.append(x[i+1]-x[i])
B.sort(reverse=True)
for l in range(N-1):
	B.pop(0)
print(sum(B))

### FIXED CODE ###

N, M = map(int, input().split())
X = list(map(int, input().split()))
if N < M:
	x = sorted(X)
	B = []
	for i in range(0, M-1):
		B.append(x[i+1]-x[i])
	B.sort(reverse=True)
	for l in range(N-1):
		B.pop(0)
	print(sum(B))
else:
	print(0)
N = int(input())
p = list(map(int, input().split()))
i = 0
ans = 0
while(i < N - 1):
    print(p)
    print(' ' * (3 * i + 1) + str(i + 1))
    if p[i] == i + 1:
        ans += 1
        p[i], p[i + 1] = p[i + 1], p[i]
    i += 1
if p[N - 1] == N:
    ans += 1
print(ans)

### FIXED CODE ###

N = int(input())
p = list(map(int, input().split()))
i = 0
ans = 0
while(i < N - 1):
    if p[i] == i + 1:
        ans += 1
        p[i], p[i + 1] = p[i + 1], p[i]
    i += 1
if p[N - 1] == N:
    ans += 1
print(ans)
import math
r = input().split()
t = int(r[0])
a = math.pi * t**2
b = 2 * t * math.pi
print(str("{0:.10f}".format(a)) + " " + "{0:.10f}".format(b))

### FIXED CODE ###

Input = float(input())
Area = Input**2*3.141592653589
Circumference = Input*2*3.141592653589
print('{0:.6f} {1:.6f}'.format(Area,Circumference))
endday = [31] * 12
endday[2] = 28
for i in [4,6,9,11]:
    endday[i] = 30

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

res = 0
done = False
for m in range(1, 13):
    if done:
        break
    for d in range(1, endday[m] + 1):
        if m == d:
            res += 1
        if m == a and d == b:
            done = True
            break

print(res)


### FIXED CODE ###



endday = [31] * 13
endday[2] = 28
for i in [4,6,9,11]:
    endday[i] = 30

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

res = 0
done = False
for m in range(1, 13):
    if done:
        break
    for d in range(1, endday[m] + 1):
        if m == d:
            res += 1
        if m == a and d == b:
            done = True
            break

print(res)
import sys
from collections import Counter

n = int(input())
arr = list(map(int, input().split()))

c = list(Counter(arr).items())

c.sort()

if c[0][0] != 0 or c[0][1] != 1:
    print(0)
    sys.exit()

prev_k = 0
prev_v = 1
ans = 1
mod = 998244353
for k, v in c[1:]:
    if k - prev_k > 1:
        print(0)
        sys.exit()
    else:
        ans *= pow(prev, i) % mod
        ans %= mod
        prev_k = k
        prev_v = v

print(ans)

### FIXED CODE ###

from collections import Counter


def solve(n, arr):
    if arr[0] != 0:
        return 0

    c = Counter(arr)

    if c[0] != 1:
        return 0
    max_c = max(c)
    for i in range(max_c + 1):
        if i not in c:
            return 0

    c = list(c.items())
    c.sort()

    prev = 1
    ans = 1
    mod = 998244353

    for _, i in c[1:]:
        ans *= pow(prev, i) % mod
        ans %= mod
        prev = i

    return ans


n = int(input())
arr = list(map(int, input().split()))

print(solve(n, arr))
x = input()
fx = sum(map(int, input()))
print("Yes" if int(x) % fx == 0 else "No")

### FIXED CODE ###

x = input()
fx = sum(map(int, x))
print("Yes" if int(x) % fx == 0 else "No")
A, op, B = input().split()

if op == '+':
    print(A+B)
else:
    print(A-B)


### FIXED CODE ###

A, op, B = input().split()

A = int(A)
B = int(B)

if op == '+':
    print(A+B)
else:
    print(A-B)
def c():
    n = int(input())
    a = list(map(int, input().split()))
    x = []
    def set_col(rate):
        if 1 <= rate <= 399:
            return '灰色'
        elif 400 <= rate <= 799:
            return '茶色'
        elif 800 <= rate <= 1199:
            return '緑色'
        elif 1200 <= rate <= 1599:
            return '水色'
        elif 1600 <= rate <= 1999:
            return '青色'
        elif 2000 <= rate <= 2399:
            return '黄色'
        elif 2400 <= rate <= 2799:
            return '橙色'
        elif 2800 <= rate <= 3199:
            return '赤色'
        else:
            x.append(1)
            return

    res = set(map(set_col, a))
    res.remove(None)
    mi = max(1, len(res))
    ma = min(8, len(res) + len(x)) # maximum color 8
    print(mi, ma)

c()


### FIXED CODE ###

def c():
    n = int(input())
    a = list(map(int, input().split()))
    x = []
    def set_col(rate):
        if rate <= 399:
            return '灰色'
        elif rate <= 799:
            return '茶色'
        elif rate <= 1199:
            return '緑色'
        elif rate <= 1599:
            return '水色'
        elif rate <= 1999:
            return '青色'
        elif rate <= 2399:
            return '黄色'
        elif rate <= 2799:
            return '橙色'
        elif rate <= 3199:
            return '赤色'
        else:
            x.append(1)
            return

    res = set(map(set_col, a))
    if None in res: res.remove(None)
    mi = max(1, len(res))
    ma = len(res) + len(x)
    print(mi, ma)

c()
N, A, B, C = list(map(str, input().split()))
l = [0]*N
for i in range(N):
    l[i] = int(input())


def dfs(A_list, B_list, C_list, i):
    if i == N:
        return A - sum(A_list) + B - sum(B_list) + C - sum(C_list)

    dfs_not_used = dfs(A_list, B_list, C_list, i+1)
    dfs_A = dfs(A_list.append(l[i]), B_list, C_list, i+1) + 10
    dfs_B = dfs(A_list, B_list.append(l[i]), C_list, i+1) + 10
    dfs_C = dfs(A_list, B_list, C_list.append(l[i]), i+1) + 10

    return min(dfs_not_used, dfs_A, dfs_B, dfs_C)


ans = dfs([0], [0], [0], N)
print(ans)


### FIXED CODE ###

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

N, A, B, C = [int(i) for i in input().split()]
L = [int(input()) for i in range(N)]


def dfs(idx, a, b, c):

    if idx == N:
        if a == 0 or b == 0 or c == 0:
            return 1e9

        return abs(A - a) + abs(B - b) + abs(C - c)

    x = dfs(idx + 1, a, b, c)
    y = dfs(idx + 1, a + L[idx], b, c) + 10*(a != 0)
    z = dfs(idx + 1, a, b + L[idx], c) + 10*(b != 0)
    w = dfs(idx + 1, a, b, c + L[idx]) + 10*(c != 0)
    return min(x, y, z, w)


ans = dfs(0, 0, 0, 0)
print(ans)
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n = I()
v = LI()
vs = sorted(v)

def kati(x,y):
    return (x+y)/2

result = []
for i in range(2, n):
    t = kati(kati(vs[i-2], vs[i-1]), vs[i])
    result.append(t)

ans = max(result)
print(ans)

### FIXED CODE ###

from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n = I()
v = LI()
vs = sorted(v)

def kati(x,y):
    return (x+y)/2

result = vs[0]
cv = 0
for i in range(1, n):
    result = kati(result, vs[i])

print(result)
import sys
import bisect

def I(): return int(sys.stdin.readline().rstrip())
def LI():return list(map(int,sys.stdin.readline().rstrip().split()))
def LS():return list(sys.stdin.readline().rstrip().split())


def main():
  X,N = LI()[:]
  if N > 0:
    P = LI()
    P.sort()
    
  if N==0:
    print(X)
    exit()
    
  index = bisect.bisect_left(P, X)
  
  l = index
  r = index
  for i in range(0,100):
    up = X + i
    down = X - i
    
    if l < 0:
      print(down)
      break
    
    if r > N:
      print(up)
      break
     
    # Left優先
    if P[l] != down:
      print(down)
      break
     
    if P[r] != up:
      print(up)
      break
    
    l -= 1
    r += 1
    
if __name__ == '__main__':
	main()


### FIXED CODE ###

import sys
import bisect

def I(): return int(sys.stdin.readline().rstrip())
def LI():return list(map(int,sys.stdin.readline().rstrip().split()))
def LS():return list(sys.stdin.readline().rstrip().split())


def main():
  X,N = LI()[:]
  if N > 0:
    P = LI()
    P.sort()
  else:
    print(X)
    exit()
  
  #print(X,N)
  #print(P)
  
  index = bisect.bisect_left(P, X)
  #print("index=",index)
  if index >= N :
    print(X)
    exit()
    
  l = index
  r = index
  for i in range(0,200):
    up = X + i
    down = X - i
    
    #print("l=",l,"r=",r)
     
    # Left優先
    if l < 0 or P[l] != down:
      print(down)
      break

    if r >= N or P[r] != up:
      print(up)
      break
    
    l -= 1
    r += 1
    
if __name__ == '__main__':
	main()
N = int(input())

NL = []
PL = []
ans = 0

if N < 10:
  for i in range(N):
    NL.append(i+1)
    PL.append(i+2)
else:
  NL = list(range(1, N+1))
  PL = list(range(2, N+2))
PL[N-1] = 1

for i in range(N):
  ans += NL[i] % PL[i]

print(ans)

### FIXED CODE ###

N = int(input())
print(N*(N-1)//2)
import sys
sys.setrecursionlimit((10 ** 5) * 2)
 
def kai(a):
  if a == 1:
    return 1
  else:
    return a*kai(a-1)
  
N = int(input())
S = input()
count = 0
ans = 1
 
for i, s in enumerate(S):
  if ((s == "W") & (i%2 == 0)) or ((s == "B") & (i%2 == 1)):
    ans *= (i - (count*2))
    count += 1

other = N - count
if other != 0:
  ans *= (kai(other*2)//(2**other))
 
print((ans*kai(N))%(10**9 + 7))

### FIXED CODE ###

N = int(input())
S = input()
count = 0
ans = 1
m = 10**9 + 7
 
for i in range(N):
  if S[2*i] == "W":
    ans = ans * ((2*i) - (count*2))%m
    count += 1
  if S[2*i + 1] == "B":
    ans = ans * ((2*i + 1) - (count*2))%m
    count += 1
 
if count != N:
  print(0)
else:
  for o in range(1, N+1):
    ans *= o
    ans %= m
  print(ans % m)
# coding: utf-8
 
# R: Right hand side
# L: Left  hand side
def add_stone(stone, pos, searched_stones):
    sample = searched_stones[::[1, -1][pos == "R"]]
    if sample[0] == stone:
        return None
 
    for n, s in enumerate(sample[1:]):
        if s == stone:
            return (stone * (n + 2) + sample[1 + n:])[::[1, -1][pos == "R"]]
 
 
def stones_bfs(searched_stones):
    
    queue = [searched_stones + "0"]
    patterns = [["B", "R"], ["B", "L"], ["W", "R"], ["W", "L"]]
    
    while queue:
        stones = queue.pop(0)
        if (stones.count("W") == len(stones) - 1 |
            stones.count("B") == len(stones) - 1):
            return int(stones[-1])
            
        for p in patterns:
            s = add_stone(*p, stones[:-1])
            if s is not None:
                queue += [s + str(int(stones[-1]) + 1)]
 
print(stones_bfs(input().strip()))

### FIXED CODE ###

# coding: utf-8

stones = input().strip()
counter, switch = 0, stones[0]

for s in stones[1:]:
    if switch != s:
        switch = s
        counter += 1

print(counter)
a=int(input())
b=0
c=[0]*a
for i in range(1,a+1):
  b=0
  e=i
  while 1:
    i%=2
    if i%2!=0:
      c[e]=b
      break
    b+=1
print(max(c))
      
  


### FIXED CODE ###

a=int(input())
b=0
for i in range(7):
  if 2**i<=a:
    b=2**i
print(b)
h, w=map(int, input().split())
a=[]
visited=[[True for i in range(w)] for j in range(h)]
need_visited=[[0 for i in range(w)] for j in range(h)]
stack=[]
for i in range(h):
    a.append(list(input()))

for i in range(h):
    for j in range(w):
        if a[i][j]=="#":
            stack.append([i, j])
            visited[i][j]=False



dx=[1, -1, 0, 0]
dy=[0, 0, 1, -1]


while len(stack)!=0:
    now_point=stack.pop(0)
    now_y=now_point[0]
    now_x=now_point[1]
    for i in range(4):
        if 0<=now_x+dx[i]<=w-1 and 0<=now_y+dy[i]<=h-1:
            if a[now_x+dx[i]][now_y+dy[i]]==".":
                if visited[now_x+dx[i]][now_y+dy[i]]:
                    need_visited[now_x+dx[i]][now_y+dy[i]]=need_visited[now_x][now_y]+1
                    visited[now_x+dx[i]][now_y+dy[i]]=False

                    stack.append([now_x+dx[i], now_y+dy[i]])
max_list=[]
for i in range(h):
    max_list.append(max(need_visited[i]))
print(max(max_list))


### FIXED CODE ###

from collections import deque

H, W = [int(x) for x in input().split()]
cell = [list(input()) for i in range(H)]

painted = deque()
for h in range(H):
    for w in range(W):
        if cell[h][w] == '#':
            painted.append([h, w, 0])

ans = 0
while len(painted) > 0:
    blackcell = painted.popleft()
    for dy, dx in [[1, 0], [0, 1], [-1, 0], [0, -1]]:
        nh = blackcell[0] + dy
        nw = blackcell[1] + dx
        d = blackcell[2]
        if 0 <= nh < H and 0 <= nw < W and cell[nh][nw] == '.':
            cell[nh][nw] = '#'
            painted.append([nh, nw, d + 1])
        ans = d

print(ans)
import sys
import numpy as np
sys.setrecursionlimit(200000)

n,w = (int(x) for x in input().split())
a = [tuple(map(int, input().split())) for _ in range(n)]
dp = np.full((n+1, w+1), -1)

def rec(i, j):
  if dp[i][j] != -1:
    return dp[i][j]
  if i == n:
    res = 0
  elif j == 0:
    res = 0
  elif j < a[i][0]:
    res = rec(i+1, j)
  else:
    res = max(rec(i+1, j), rec(i+1, j - a[i][0]) + a[i][1])
  dp[i][j] = res
  return dp[i][j]

print(int(rec(0, w)))


### FIXED CODE ###

import sys
sys.setrecursionlimit(200000)

n,w = (int(x) for x in input().split())
a = [tuple(map(int, input().split())) for _ in range(n)]
dp = [[0] * (w+1) for _ in range(n+1)]

def rec(i, j):
  if dp[i][j] != 0:
    return dp[i][j]
  if i == n:
    res = 0
  elif j < a[i][0]:
    res = rec(i+1, j)
  else:
    res = max(rec(i+1, j), rec(i+1, j - a[i][0]) + a[i][1])
  dp[i][j] = res
  return dp[i][j]

print(int(rec(0, w)))
s= input()
res = "2018"+s[4,len(s)]
print(res)

### FIXED CODE ###

s= input()
res = "2018"+s[4:len(s)]
print(res)
import sys
K = int(input())

listup = []
listup.append(list(range(1, 10)))
list_length = 9
finish = False
for i in range(10000000):
    new_list_floor = []
    for value in listup[i]:
        newlist = []
        mod_value = value % 10
        if mod_value == 0:
            newlist.append(value * 10 + mod_value)
            newlist.append(value * 10 + mod_value + 1)
        elif mod_value == 9:
            newlist.append(value * 10 + mod_value - 1)
            newlist.append(value * 10 + mod_value)
        else:
            newlist.append(value * 10 + mod_value - 1)
            newlist.append(value * 10 + mod_value)
            newlist.append(value * 10 + mod_value + 1)
        list_length_before = list_length
        list_length += len(newlist)
        new_list_floor.extend(newlist)
        if list_length >= K:
            diff = K - list_length_before
            print(newlist[diff - 1])
            sys.exit(0)
    listup.append(new_list_floor)
print(listup)

### FIXED CODE ###

import sys
K = int(input())

listup = []
listup.append(list(range(1, 10)))
list_length = 9
if K <= 9:
    print(listup[0][K - 1])
    sys.exit(0)
for i in range(10000000):
    new_list_floor = []
    for value in listup[i]:
        newlist = []
        mod_value = value % 10
        if mod_value == 0:
            newlist.append(value * 10 + mod_value)
            newlist.append(value * 10 + mod_value + 1)
        elif mod_value == 9:
            newlist.append(value * 10 + mod_value - 1)
            newlist.append(value * 10 + mod_value)
        else:
            newlist.append(value * 10 + mod_value - 1)
            newlist.append(value * 10 + mod_value)
            newlist.append(value * 10 + mod_value + 1)
        list_length_before = list_length
        list_length += len(newlist)
        new_list_floor.extend(newlist)
        if list_length >= K:
            diff = K - list_length_before
            print(newlist[diff - 1])
            sys.exit(0)
    listup.append(new_list_floor)
print(listup)
a, b, c = map(int, input().split())
k = int(input())

for i in range(k):
    if a >= b:
        b = b*2
    else:
        c = c*2


if a < b and b < c:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

n = int(input())

print(10-n//200)
a, b = map(int, input())
print(a*b)


### FIXED CODE ###

a, b = map(int, input().split())
l = 2*(a+b)
s = a*b
print("{} {}".format(s, l))
k = []
for i in range(1,101):
    k.append(int(i))
x,n = map(int,input().split())
try:
    p = list(map(int,input().split()))
except EOFError:
    pass

if n == 0:
    print(x)
else:
    for i in range(0,len(p)):
        if p[i] != x:
            k.remove(p[i])
    l = k.index(x)
    if abs(k[l]-k[l-1]) < abs(k[l]-k[l+1]) or x < k[l+1]:
        print(k[l-1])
    else:
        print(k[l+1])


### FIXED CODE ###

X, N = map(int, input().split())
P = list(map(int, input().split()))

P.sort()
ans = 10000000
for i in range(-101, 102):
  if not i in P:
    ans = min(ans, abs(i-X))

if not X-ans in P:
  print(X-ans)
else:
  print(X+ans)
n,t = map(int, input().split())
l = []
for _ in range(n):
  i, c = map(int, input().split())
  if not c => j:
    l.append([c, j])
l.sort(key=lambda x: x[1])
print(l[0][0])

### FIXED CODE ###

N,T = map(int, input().split())
l = []
for i in range(N):
  c, t = map(int, input().split())
  if not t > T:
    l.append([i+1, c])
if l == []:
    print('TLE'); exit()
l.sort(key=lambda x: x[1])
print(l[0][1])