Harryxun/stf_run huggingface dataset:
N,L = list(map(int,input().split()))

Iloha = []

for i in range(N):
    S = input()
    Iloha.append(S)

Iloha.sort()

print("".join(Iloha))


### FIXED CODE ###

x = list(map(int, input().split()))
x.sort()

if x == [5, 5, 7]:
    print("YES")
else:
    print("NO")
n,m = map(int,input().split())
s = str(input())
print(s[:m-1]+s[m-1].lower+s[m-1])

### FIXED CODE ###

n,m = map(int,input().split())
s = str(input())
print(s[:m-1]+chr(ord(s[m-1])-ord("A")+ord("a"))+s[m:])
def main(self, case):
  for i in range(len(case)):
    AC = 0
    WA = 0
    TLE = 0
    RE = 0
    others = 0
    if case = "AC":
      AC += 1
      return AC
    elif case = "WA":
      WA += 1
      return WA
    elif case = "TLE":
      TLE += 1
      return TLE
    elif case = "RE":
      RE += 1
      return RE
    elif :
      others += 1
      return others
  print("AC"+"x"+AC)
  print("WA"+"x"+WA)
  print("TLE"+"x"+TLE)
  print("RE"+"x"+RE)
  


### FIXED CODE ###

N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
others = 0
for i in range(N):
  case = input()
  if case == "AC":
    AC += 1
      
  elif case == "WA":
    WA += 1
      
  elif case == "TLE":
    TLE += 1
      
  elif case == "RE":
    RE += 1
      
print("AC"+" x "+str(AC))
print("WA"+" x "+str(WA))
print("TLE"+" x "+str(TLE))
print("RE"+" x "+str(RE))
K = int(input().split())
X = int(input().split())
K = K *500
if K >= X:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

k,x = [int(x) for x in input().split()]

k = k * 500 

if k >= x:
  print("Yes")
else:
	print("No")
#import math

while True:
    w = []
    k = []
    for i in range(10):
        w.append(int(input()))
    for i in range(10):
        k.append(int(input()))
    w.sort()
    k.sort()
    print(sum(w[7:]),sum(k[7:]))


### FIXED CODE ###

w = [int(input()) for i in range(10)]
k = [int(input()) for i in range(10)]
w.sort()
k.sort()
print(sum(w[-3:]),sum(k[-3:]))
import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]

    A,B,C,D,E,F = LI()

    w = set()
    for i in range(int(F/A/100)+1):
        for j in range(int(F/B/100)+1):
            #if 0 < A*i+B*j <= int(F/100):
                w.add((A*i+B*j)*100)
    s = set()
    for i in range(int(F*E/(100+E)/C)+1):
        for j in range(int(F*E/(100+E)/D)+1):
            if 0 <= C*i+D*j <= int(F*E/(100+E)):
                s.add(C*i+D*j)

    max_E = -1.0
    ans_w = 0
    ans_s = 0
    for x in w:
        for y in s:
            if x + y <= F and y/x*100 <= E and max_E < y/(x+y) * 100:
                max_E = y/(x+y) * 100
                ans_w = x + y
                ans_s = y
    print(ans_w,ans_s)

if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]

    A,B,C,D,E,F = LI()

    w = set()
    for i in range(int(F/A/100)+1):
        for j in range(int(F/B/100)+1):
            if 0 < A*i+B*j <= int(F/100):
                w.add((A*i+B*j)*100)
    s = set()
    for i in range(int(F*E/(100+E)/C)+1):
        for j in range(int(F*E/(100+E)/D)+1):
            if 0 <= C*i+D*j <= int(F*E/(100+E)):
                s.add(C*i+D*j)

    max_E = -1.0
    ans_w = 0
    ans_s = 0
    for x in w:
        for y in s:
            if x + y <= F and y <= x/100 * E and max_E < y/(x+y) * 100:
                max_E = y/(x+y) * 100
                ans_w = x + y
                ans_s = y
    print(ans_w,ans_s)

if __name__ == '__main__':
    main()
def bitsum(bit,i):
    s = 0
    while i > 0:
        s += bit[i]
        i -= i&(-i)
    return s
    

def bitadd(bit,i,x):
    while i <= N:
        bit[i] += x
        i += i&(-i)
    return bit
    
#################################
import math
N, K = map(int,input().split())
a = list(map(int,input().split()))


n_ = int(math.log2(N)) + 1
bit = [0] * (2**n_)
bit.append(0)

################################
ass = 0
for j in range(N):
    ass += j-bitsum(bit,a[j])
    bit = bitadd(bit,a[j],1)

Ans = ass*(K*(K+1)/2)+(N*(N-1)/2-ass)*(K*(K-1)/2)

print(int(Ans%(10^9+7)))

### FIXED CODE ###

N, K = map(int,input().split())
An = list(map(int,input().split()))
f_count = 0
r_count = 0

for i in range(N):
    for j in range(N):
        if i < j:
            if An[i] < An[j]:
                f_count += 1
            elif An[i] > An[j]:
                r_count += 1

Ans = (f_count * K*(K-1)//2 + r_count * (K*(K+1)//2)) % (10**9+7)

print(int(Ans))
n = int(input())

a = list(map(int, input().split()))
if len(a)%2 !=0:
  a.append(0)
  
a.sort()
d = 0

for i in range(n/2):
  d += a[2i+1] - a[2i]
 
pritn(d)


### FIXED CODE ###

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

if n%2 != 0:
  a.append(0)
  n += 1
 
a.sort()
d = 0

for i in range(int(n/2)):
               d += a[2*i+1]-a[2*i]
           
print(d)
def resolve():
    # 1000000000000001
    from collections import deque
    S = "abcdefghijklmnopqrstuvwxyz"
    N = int(input())
    tmp = N
    A = deque()

    while True:
        N, a = divmod(N, 26)
        A.append(a)
        if N == 0:
            break
    print(N, a, file=sys.stderr)
    if tmp % 26 == 0:
        A.pop()
    for a in reversed(A):
        print(S[a - 1], end="")
    print()

resolve()

### FIXED CODE ###

def resolve():
    from collections import deque
    S = "abcdefghijklmnopqrstuvwxyz"
    N = int(input())
    A = deque()
    while True:
        N -= 1
        N, a = divmod(N, 26)
        A.appendleft(a)
        if N == 0:
            break
    for a in A:
        print(S[a], end="")
    print()


resolve()
n = int(input())
map_list = []
for _ in range(n):
    map_list.append(input().split())

found_data = False
def function():
    for i in range(101):
        for j in range(101):
            c = 0
            x = map_list[0][0]
            y = map_list[0][1]
            h = max(int(map_list[0][2]), 0)
            H = abs(i - int(x)) + abs(j - int(y)) + int(h)
            #print('base:',i, j, H)
        
            for data in map_list[1:]:
                x, y, h = data
                h = max(int(h), 0)
                #print('check:',i, j, H, abs(i - int(x)) + abs(j - int(y) + int(h)))
                if H != abs(i - int(x)) + abs(j - int(y)) + int(h):
                    break
                c += 1
            if c >= n - 1:
                return i, j, H
            
i, j, H = function()
print(i, j, H)

### FIXED CODE ###

n = int(input())
map_list = []
for _ in range(n):
    map_list.append(input().split())

def function():
    for i in range(101):
        if int(map_list[i][2]) > 0:
            x = int(map_list[i][0])
            y = int(map_list[i][1])
            h = int(map_list[i][2])
            break
        else:
            continue

    for i in range(101):
        for j in range(101):
            cont_check = True
            H = abs(x - i) + abs(y - j) + h
            
            for data in map_list:
                xx, yy, hh = map(int, data)
                if hh != max(H - abs(xx - i) - abs(yy - j), 0):
                    cont_check = False
                    break
            if cont_check:
                return i, j, H

i, j, H = function()
print(i, j, H)
N = raw_input()
MIN_GNUM = 3
print N / MIN_GNUM



### FIXED CODE ###

N = input()
MIN_GNUM = 3
print N / MIN_GNUM
from collections import deque

def isCLKWISE(ph):
    a = [ph[-1][0]-ph[-3][0],ph[-1][1]-ph[-3][1]]
    b = [ph[-2][0]-ph[-3][0],ph[-2][1]-ph[-3][1]]
    crs = a[0]*b[1] - a[1]*b[0]
    if crs < 0 :
        return False
    else :
        return True
    
def ConvexHullScan(P):
    P = sorted(P)
    phU = deque([P[0],P[1]])
    for p in P[2:]:
        phU.append(p)
        while(True):
            if isCLKWISE(phU) :
                break
            else :
                del phU[-2]
                if len(phU) == 2 :
                    break
    phL = deque([P[-1],P[-2]])
    for p in P[-3::-1]:
        phL.append(p)
        while(True):
            if isCLKWISE(phL) :
                break
            else :
                del phL[-2]
                if len(phL) == 2 :
                    break
    ph = phU + phL[1:-1]
    return ph

n = int(input())
P = deque([])
for i in range(n):
    P.append([int(x) for x in input().split()])
    
Q = ConvexHullScan(P)
Q.reverse()
print(len(Q))
for q in Q:
    idx = min([[x[1][1],x[1][0],x[0]] for x in enumerate(Q)])[2]
    R = Q[idx:] + Q[:idx]
for r in R:
    print(r[0],r[1])

### FIXED CODE ###

def isCLKWISE(ph) : return not ((ph[-1][0] - ph[-3][0])*(- ph[-3][1] + ph[-2][1]) - (ph[-2][0] - ph[-3][0])*(- ph[-3][1] + ph[-1][1] ) < 0)
      
def ConvexHullScan(P):
    P = sorted(P)
    phU = [P[0],P[1]]
    for p in P[2:]:
        phU.append(p)
        while(True):
            try :
                if isCLKWISE(phU) : break
                else : del phU[-2]
            except IndexError : break
    phL = [P[-1],P[-2]]
    for p in P[-3::-1]:
        phL.append(p)
        while(True):
            try :
                if isCLKWISE(phL) : break
                else : del phL[-2]
            except IndexError : break
    ph = phU + phL[1:-1]
    return ph
  
P = [[int(x) for x in input().split()] for _ in range(int(input()))]
P = ConvexHullScan(P)
P.reverse()
print(len(P))
idx = min([[x[1][1],x[1][0],x[0]] for x in enumerate(P)])[2]
for p in P[idx:] + P[:idx] : print(p[0],p[1])
H, W = map(int, input().split())
S = [input() for i in range(H)]
 
 
b_list = []
for row in S:
    tmp_raw = []
    for j, t in enumerate(row):
        if t == '#':
            tmp_raw.append(j)
    b_list.append(tmp_raw)
tmp = -1
res = {}
raw_before = []
for i, raw in enumerate(b_list):
    res[i] = {}
    for j in raw:
        res[i][j] = []
        if not((j - 1) in raw or j == 0):
            res[i][j].append((i, j-1))
        if not((j + 1) in raw or j == W -1):
            res[i][j].append((i, j+1))
        if not(i == 0 or j in raw_before):
            res[i][j].append((i-1, j))
        if not(i == H - 1):
            if not(j in b_list[i+1]):
                res[i][j].append((i+1, j))
    raw_before = raw
 
 
 
before = 0
for i, raw in enumerate(b_list):
    for j in raw:
         before += len(res[i][j])
while True:
    for i, raw in enumerate(b_list):
        for j in raw:
            try:
                if S[i-1][j] == '.' or S[i][j-1] == '.':
                    res[i][j] += res[i-1][j-1]
            except:
                pass
            try:
                if S[i+1][j] == '.' or S[i][j-1] == '.':
                    res[i][j] += res[i+1][j-1]
            except:
                pass
            try:
                if S[i-1][j] == '.' or S[i][j+1] == '.':
                    res[i][j] += res[i-1][j+1]
            except:
                pass
            try:
                if S[i+1][j] == '.' or S[i][j+1] == '.':
                    res[i][j] += res[i+1][j+1]
            except:
                pass
    before = result
    for i, raw in enumerate(b_list):
        for j in raw:
            res[i][j] = list(set(res[i][j]))
    result = 0
    for i, raw in enumerate(b_list):
        for j in raw:
             result += len(res[i][j])
    if before == result:
        break
print(result)

### FIXED CODE ###

N = int(input())
H = int(input())
W = int(input())
print((N - H + 1) * (N - W + 1))
a,b,c,d = int(input())
if a+b > c+d:
  ans = "Left"
elif a+b < c+d:
  ans = "Right"
else:
  ans = "Balanced"

print(ans)

### FIXED CODE ###

a,b,c,d = map(int,input().split())
if a+b > c+d:
  ans = "Left"
elif a+b < c+d:
  ans = "Right"
else:
  ans = "Balanced"

print(ans)
a=int(input())
k=[]
for i in range(a):
  k.append(int(input()))
l =1
for i in range(1,a):
  for j in range(i):
    if k[i] >= k[j]:
      l += 1
print(l)

### FIXED CODE ###

a = int(input())
k = list(map(int,input().split()))
kijun = k[0]
l = 1
for i in range(1,a):
    if k[i] >= kijun:
        l += 1
        kijun = k[i]
print(l)
n = int(input())
A = list(map(int, input().split()))
mod = 10**9 + 7
mem = [0, 0, 0]
ans = 1
for i in range(n):
    ans *= mem.count(A[i])
    ans %= mod
    idx = mem.index(A[i])
    mem[idx] += 1
print(ans)

### FIXED CODE ###

n = int(input())
A = list(map(int, input().split()))
mod = 10**9 + 7
mem = [0, 0, 0]
ans = 1
for i in range(n):
    ans *= mem.count(A[i])
    ans %= mod
    if ans == 0: break
    idx = mem.index(A[i])
    mem[idx] += 1
print(ans)
s = input()
l = [s[0]]
for c in s[1:]:
    if c in l[-1]:
        l[-1] += c
    else:
        l.append(c)
a = []
now = 0
for c in l:
    if '<' in c:
        if now == 0:

            for i in range(len(c) + 1):
                a.append(i)
        else:
            for i in range(1, len(c) + 1):
                a.append(i)
        now = len(c)
    if '>' in c:
        if now <= len(c):
            a.pop()
            for i in reversed(range(len(c) + 1)):
                a.append(i)
        else:
            for i in reversed(range(len(c))):
                a.append(i)
        now = len(c) + 1
print(sum(a))

### FIXED CODE ###

def sigma(n):
    return n * (n + 1) // 2

s = list(map(lambda x : 1 if x == '<' else -1, input()))
l = [s[0]]
for c in s[1:]:
    if c * l[-1] > 0:
        l[-1] += c
    else:
        l.append(c)
ans = 0
now = 0
for c in l:
    if c < 0:
        ans -= min(now, abs(c))
    ans += sigma(abs(c))
    now = abs(c)
print(ans)
def main():
    import sys
    input = sys.stdin.buffer.readline
    N = int(input())
    X = list(input())

    def popcount(x):
        # 2bitごとの組に分け、立っているビット数を2bitで表現する
        x = x - ((x >> 1) & 0x5555555555555555)

        # 4bit整数に 上位2bit + 下位2bit を計算した値を入れる
        x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)

        x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f  # 8bitごと
        x = x + (x >> 8)  # 16bitごと
        x = x + (x >> 16)  # 32bitごと
        x = x + (x >> 32)  # 64bitごと = 全部の合計
        return x & 0x0000007f

    # X = ['']*N
    # for i in range(N):
    #     X[i] = str(random.randint(0, 1))
    # print("".join(X))
    C = X.count("1")

    dp = [0]*N
    dp[0] = 0
    for i in range(1, N):
        k = i % popcount(i)
        dp[i] = 1 + dp[k]

    # def solve(n, d):

    for i in range(N):
        if X[i] == "0":
            X[i] = '1'
            print(dp[int((''.join(X)), 2) % (C+1)] + 1)
            #tmp = dp[int((''.join(X)), 2) % (C+1)] + 1
            X[i] = '0'
        else:
            if C == 1:
                print(0)
                continue
            X[i] = '0'
            print(dp[int((''.join(X)), 2) % (C-1)] + 1)
            #tmp = dp[int((''.join(X)), 2) % (C-1)] + 1
            X[i] = '1'


main()
# print(dp)


### FIXED CODE ###

def main():
    import sys
    input = sys.stdin.buffer.readline
    N = int(input())
    X = input().decode()
    K = int(X, 2)
    X = list(X)

    def popcount(x):
        # 2bitごとの組に分け、立っているビット数を2bitで表現する
        x = x - ((x >> 1) & 0x5555555555555555)

        # 4bit整数に 上位2bit + 下位2bit を計算した値を入れる
        x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)

        x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f  # 8bitごと
        x = x + (x >> 8)  # 16bitごと
        x = x + (x >> 16)  # 32bitごと
        x = x + (x >> 32)  # 64bitごと = 全部の合計
        return x & 0x0000007f

    # X = ['']*N
    # for i in range(N):
    #     X[i] = str(random.randint(0, 1))
    # print("".join(X))
    C = X.count("1")
    dpL = [0]*N
    dpR = [0]*N
    tmp = 1
    dpL[0] = 1 % (C+1)
    L = K % (C+1)

    if C == 1:
        R = 0
    else:
        R = K % (C-1)
        dpR[0] = 1 % (C-1)

    for i in range(1, N):
        dpL[i] = dpL[i-1]*2 % (C+1)
        if C > 1:
            dpR[i] = dpR[i-1]*2 % (C-1)

    dp = [0]*N
    dp[0] = 0
    for i in range(1, N):
        k = i % popcount(i)
        dp[i] = 1 + dp[k]

    # def solve(n, d):

    for i in range(N):
        if X[i] == "0":
            print(dp[(L + dpL[N-i-1]) % (C+1)] + 1)
        else:
            if C == 1:
                print(0)
                continue
            X[i] = '0'
            print(dp[(R - dpR[N-i-1]) % (C-1)] + 1)
            #tmp = dp[int((''.join(X)), 2) % (C-1)] + 1
            X[i] = '1'


main()
# print(dp)
n, k = map(int, input().split())
p = list(map(int, input().split()))
(

### FIXED CODE ###

n, k = map(int, input().split())
p = list(map(int, input().split()))

dicesum = 0
maxsum = 0
for i in range(n):
	dicesum += p[i]
	if i >= k:
		if n != k: dicesum -= p[i-k]
	maxsum = max(maxsum, dicesum)

ans = (maxsum + k) / 2
print(ans)
import sys
from math import factorial
from fractions import Fraction
import heapq, bisect, fractions
import math
import itertools
from scipy.misc import comb
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
MOD = 10**9 + 7

n, k = MAP()
a = LIST()


a.sort(reverse = True)
res = 0
for i in range(n-k+1):
    res += a[i] * comb(n-i-1, k-1, exact = True)

a.reverse()
for i in range(n-k+1):
    res -= a[i] * comb(n-i-1, k-1, exact = True)

print(res%MOD)




### FIXED CODE ###

import sys
from math import factorial
from fractions import Fraction
import heapq, bisect, fractions
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
MOD = 10**9 + 7

n, k = MAP()
a = LIST()

def mpow(a, n):
    if n == 0:return 1
    if n == 1:return a%MOD
    if n%2 == 1:return (a%MOD * mpow(a, n-1)%MOD)%MOD
    t = mpow(a, n//2)
    return (t*t)%MOD

fac = [1]*(n+1)
inv_fac = [1]*(n+1)
for i in range(n):
    fac[i+1] = (fac[i]*(i+1))%MOD
inv_fac[n] = mpow(fac[n], MOD-2)
for i in range(n, 0, -1):
    inv_fac[i-1] = (inv_fac[i]*i)%MOD

def cmb(n, r):
    if n == 0 and r == 0:return 1
    if n<r or n<0:return 0
    return (fac[n]*(inv_fac[r]*inv_fac[n-r])%MOD)%MOD
 
a.sort(reverse = True)
res = 0
for i in range(n-k+1):
    res += (a[i]*cmb(n-i-1, k-1))%MOD
    res = res%MOD
 
a.reverse()
for i in range(n-k+1):
    res -= (a[i]*cmb(n-i-1, k-1))%MOD
    res = res%MOD
 
print(res)
if 7 in N
print('Yes')
if not 7 in N
print('No')


### FIXED CODE ###

N=input()
if '7' in N:
  print('Yes')
else:
  print('No')
import copy
N,M=map(int,input().split())

A = [[int(i)-1 for i in input().split()] for i in range(M)]
#print(A)
def dfs(x):
  if visited[x]:
    return
  visited[x]=True
  for i in range(N):
    if edgemat[x][i]:
      dfs(i)
answer=0

for i in range(M):
  visited=[False]*N
  Acopy=copy.deepcopy(A)
  del Acopy[i]
  edgemat=[[0] *N for j in range(N)]
  for m,n in Acopy:
    edgemat[m][n]=1
    edgemat[n][m]=1
  dfs(0)
  if any(visited[y] == False for y in range(N)):
    answer+=1
print(answer)

### FIXED CODE ###

#https://atcoder.jp/contests/abc075/submissions/2242350
N,K=map(int,input().split())

points=[tuple(map(int,input().split())) for i in range(N)]
answer=10**19
sortx=sorted(points)
numberx = list(enumerate(sortx))

#n-k+1以降を左の頂点とすると点の数が明らかに足りない
for left,(x1,y1) in numberx[:N-K+1]:
  #left+K-1以降を右の頂点にしないと間に足りる点の数が入ってない
  for right,(x2,y2) in numberx[left+K-1:]:
    dx=x2-x1
    #left-rightの間でyについてsort
    sorty=sorted(y for x,y in sortx[left:right+1])
    #K個点を入れた状態で面積を求める
    for y3,y4 in zip(sorty,sorty[K-1:]):
      if y3<=y1 and y3<=y2 and y4>=y1 and y4>=y2:
        answer=min(answer,dx*(y4-y3))
         
print(answer)
from numpy.random import mtrand

mt = []

for i in range(10):
    mt.append(input())

print(mt.pop(mt.index(max(mt))))
print(mt.pop(mt.index(max(mt))))
print(mt.pop(mt.index(max(mt))))

### FIXED CODE ###

mt = []

for i in range(10):
        mt.append(int(input()))

mt.sort()
print( mt[9] )
print( mt[8] )
print( mt[7] )
N, K = map(int, input().split())

def fact(n):
    if n == 0 or n == 1:
        return 1
    else:
        return n * fact(n-1)

def nCr(n, r):
    return fact(n) // fact(n - r) * fact(r)
 
for j in range(K):
  if (2*j+1)>N:
    print(0)
  else:
    x = (nCr((K-1), j) * nCr(N-K+1, j+1))
    if (x > (10**9+7)):
         print(x%(10**9+7))
    else:
         print(x)

### FIXED CODE ###

N, K = map(int, input().split())
from operator import mul
from functools import reduce
 
def nCr(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under
 
for j in range(K):
  if (K+j)>N:
    print(0)
  else:
    x = (nCr((K-1), j) * nCr(N-K+1, j+1))
    if (x > (10**9+7)):
         print(x%(10**9+7))
    else:
         print(x)
N = input()
count = N.count(9)
if count >= 1:
    print("Yes")
else:
    print("No")
    

### FIXED CODE ###

N = input()
count = N.count("9")
if count >= 1:
    print("Yes")
else:
    print("No")
N,T=map(int,input())
ans=100000000
for i in range(n):
  c,t=map(int,input().split())
  if t>T: continue
  ans=min(c,ans)
print(ans if ans<100000000 else 'TLE')

### FIXED CODE ###

N,T=map(int,input().split())
ans=100000000
for i in range(N):
  c,t=map(int,input().split())
  if t>T: continue
  ans=min(c,ans)
print(ans if ans<100000000 else 'TLE')
from collections import Counter
a,b,c = map(int,input().split())
d = ""
e = ("1"*b + "0"*c)*a
f = e[:a]
g = Counter(f)
print(g["1"])


### FIXED CODE ###

a,b,c = map(int,(input().split()))
d = (a//(b+c))*b + min((a%(b+c)),b)
print(d)
n = int(input())
ans = 0
for i in range(n):
  a,b =  input().split()
  a = double(a)
  if b == "BTC":
    a = 380000.0 * a 
  ans += a 
print(a)
    
    

### FIXED CODE ###

n = int(input())
ans = 0
for i in range(n):
  a,b =  input().split()
  a = float(a)
  if b == "BTC":
    a = 380000.0 * a 
  ans += a 
print(ans)
N =  map(int,input().split())
a = []
for i in range(N):
    a.append(map(int, input().split())



for i in range(N):
    v = a[i]
    j = i-1
    while j>=0 and a[j]>v:
        a[j+1] = a[j]
        j = j-1
        a[j+1] = v
    print(a) 


### FIXED CODE ###

N = int(input())
a = input().split()
b = [int(n) for n in a]


for i in range(N):
    v = b[i]
    j = i-1
    while j>=0 and b[j]>v:
        b[j+1] = b[j]
        j = j-1
        b[j+1] = v
    print(" ".join([str(n) for n in b]))
n = int(input())
for i in range(n):
  h = list(map(int,input()))
  h.sort()
  if h[0]**2 ++ h[1]**2 == h[2]**2:
    print('YES')
  else:
    print('NO')

### FIXED CODE ###

n = int(input())
for i in range(n):
  h = list(map(int,input().split()))
  h.sort()
  if h[0]**2 ++ h[1]**2 == h[2]**2:
    print('YES')
  else:
    print('NO')