Harryxun/stf_run huggingface dataset:
import collections

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

def primes(n):
    sieve = [True] * (n//2)
    for i in range(3,int(n**0.5)+1,2):
        if sieve[i//2]:
            sieve[i*i//2::i] = [False] * ((n-i*i-1)//(2*i)+1)
    return [1, 2] + [2*i+1 for i in range(1,n//2) if sieve[i]]

a, b = map(int, input().split())
l = [i for i, j in collections.Counter(make_divisors(a) + make_divisors(b)).items() if j > 1]
p = collections.defaultdict(int)
if not l:
    print(0)
    exit()
for i in primes(l[-1]+1): p[i] = 1
print(len([x for x in l if p.get(x)]))

### FIXED CODE ###

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

a, b = map(int, input().split())
print(len(set(prime_factorize(a)) & set(prime_factorize(b)))+1)
li=[13,1,2,3,4,5,6,7,8,9,10,11,12]
A,B = [int(x) for x in input().split()]
if(li[A]>li[B]):
  print('Alice')
elif(li[A]==li[B]):
  print('Draw')
else:
  print('Bob')

### FIXED CODE ###

li=[13,1,2,3,4,5,6,7,8,9,10,11,12]
A,B = [int(x)-1 for x in input().split()]
if(li[A]>li[B]):
  print('Alice')
elif(li[A]==li[B]):
  print('Draw')
else:
  print('Bob')
A=list(map(int,input().split()))
A.sort()
for i in range(len(A)):
  if i=0:
    continue
  else:
    res=A[i]-A[i-1]
print(res)


### FIXED CODE ###

A=list(map(int,input().split()))
A.sort()
res=0
for i in range(len(A)):
  if i==0:
    continue
  else:
    res=res+A[i]-A[i-1]
print(res)
# -*- coding: utf-8 -*-
"""
Created on Sat May  9 16:54:06 2020

@author: shinba
"""

s = input()
k = int(input())

cnt = 0

while s[cnt] == "1":
    cnt += 1

if cnt >= k:
    print(1)
else:
    print(s[cnt])


### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Sat May  9 16:54:06 2020

@author: shinba
"""

s = input()
k = int(input())

cnt = 0

while s[cnt] == "1":
    cnt += 1
    if cnt == len(s):
        break

if cnt >= k:
    print(1)
else:
    print(s[cnt])
K = int(input())
A,B = [int(i) for i in input().split()]
flag=0
for i in range(1,1001):
    if(iK>=A and iK<=B):
        print("OK")
        flag=1
        break
	if (flag==0):
    	print("NG")

### FIXED CODE ###

K = int(input())
A,B = [int(i) for i in input().split()]
flag=0
for i in range(1,1001):
    if(i*K>=A and i*K<=B):
        print("OK")
        flag=1
        break
if (flag==0):
    print("NG")
import numpy as np
N,K = (int(i) for i in input().split())  
AB = [[int(i) for i in input().split()] for i in range(N-1)] 

j = 0
point = AB[0][0]
answer = K

d = []

count = 1
for i in range(len(AB)):
    if point in AB[j]:
        AB[j].pop(AB[j].index(point))
        d.append([AB[j][0], count])
        AB.pop(j)
        count += 1
    else:
        j += 1
point = d[0][0]
answer = answer * (K-d[0][1]) % (int(10**9)+7)
d.pop(0)

while len(AB) > 0:
    j = 0
    count = 2
    for i in range(len(AB)):
        if point in AB[j]:
            AB[j].pop(AB[j].index(point))
            d.append([AB[j][0], count])
            AB.pop(j)
            count += 1
        else:
            j += 1
        stop += 1
    point = d[0][0]
    answer = answer * (K-d[0][1]) % (int(10**9)+7)
    d.pop(0)
print(answer)

### FIXED CODE ###

import numpy as np
from collections import deque

N,K = (int(i) for i in input().split())  
AB = [[int(i) for i in input().split()] for i in range(N-1)] 

Tree = [[] for _ in range(N+1)]
d = deque()

for i in range(N-1):
    a, b = AB[i]
    Tree[a].append(b)
    Tree[b].append(a)

answer = K

for i in range(len(Tree[1])):
    answer = (answer * (K - 1 - i))%(int(10**9)+7)
    d.append([1, Tree[1][i]])

Tree[1] = []

while d != deque():
    for i in range(len(d)):
        parent, child = d[0]
        Tree[child].pop(Tree[child].index(parent))
        for j in range(len(Tree[child])):
            d.append([child, Tree[child][j]])
            answer = (answer * (K - 2 - j))%(int(10**9)+7)
        d.popleft()
print(answer)
list = map(int, input().split(" "))

list = map(str, list.sort())

print(list[0] + " " + list[1] + " " + list[2])

### FIXED CODE ###

list1 = input().split(" ")
list2 = list(map(int, list1))
list3 = sorted(list2)
list4 = list(map(str, list3))
answer_string = " ".join(list4)

print(answer_string)
s = raw_input()
p = raw_input()

s3 = s + s + s

if p in s3:
    print 'Yes'
else:
    print 'No'

### FIXED CODE ###

import string
az = list(string.ascii_lowercase)
li = [0 for a in range(len(az))]

while True:
    try:
        a = raw_input()
        for b in list(a):
            if b.lower() in az:
                tmp = az.index(b.lower())
                li[tmp] = li[tmp] + 1
    except:
        break

for c in range(len(az)):
    print az[c] + ' : ' + str(li[c])
import math

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

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

cc = (B//C)-((A-1)//C)
dd = (B//D)-((A-1)//D)

x = lcm(C,D)
ee = (B//x)-((A-1)//x)

ans = (B-A+1)-(cc + dd - ee)
print(ans)

### FIXED CODE ###

import fractions

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

cc = (B//C)-((A-1)//C)
dd = (B//D)-((A-1)//D)

x= (C * D // fractions.gcd(C, D))
ee = (B//x)-((A-1)//x)

ans = (B-A+1)-(cc + dd - ee)
print(int(ans))
while True:
    g = int(input())
    now = 512
    ans = []
    while True:
        if g == 0:
            break
        elif g >= now:
            g -= now
            ans.append(now)
        now //= 2
    temp = ''
    for i in ans[::-1]:
        temp += str(i) + ' '
    print(temp[:-1])


### FIXED CODE ###

import sys
bundo = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
bundo.reverse()
for line in sys.stdin:
    n = int(line)
    ans = ''
    for i in bundo:
        if n >= i:
            n -= i
            ans = str(i) + ' ' + ans
    print(ans[:-1])
#111
from collections import Counter
n=int(input())
v=list(map(int,input().split()))
L=list(Counter(v[0::2]).items())
R=list(Counter(v[1::2]).items())


if L[0][0]!=R[0][0]:#再頻出の数がRとLで同一ではない場合
    ans=n-L[0][1]-R[0][1]
elif len(R)!=1 and len(L)!=1:
    ans=n-max(L[0][1]+R[1][1],L[1][1]+R[0][1])
elif len(R)!=1 and len(L)==1:
    ans=n-R[1][1]-L[0][1]
elif len(R)==1 and len(L)!=1:
    ans=n-R[0][1]-L[1][1]
elif : len(R)==1 and len(L)==1:
    ans=n//2
print(ans)    


### FIXED CODE ###

#111
from collections import Counter
n=int(input())
v=list(map(int,input().split()))

c0=Counter(v[0::2]).most_common()
c1=Counter(v[1::2]).most_common()

if c0[0][0]!=c1[0][0]:#再頻出の数がRとLで同一ではない場合
    ans=n-c0[0][1]-c1[0][1]
elif len(c0)!=1 and len(c1)!=1:
    ans=n-max(c0[0][1]+c1[1][1],c0[1][1]+c1[0][1])
elif len(c0)!=1 and len(c1)==1:
    ans=n-c0[1][1]-c1[0][1]
elif len(c0)==1 and len(c1)!=1:
    ans=n-c0[0][1]-c1[1][1]
elif len(c0)==1 and len(c1)==1:
    ans=n//2
print(ans)
import math
n = int(input())
print(2 * n // math.gcd(2 , n))

### FIXED CODE ###

n = int(input())
if n % 2 == 0:
	print(n)
else:
	print(2 * n)
words = lambda t : np.array(list(map(t, input().split())))

h,w = words(int)
mat = []
mat.append([True for _ in range(w+2)])
for _ in range(h):
    mat.append([True] + [a == '#' for a in input()] + [True])
mat.append([True for _ in range(w+2)])

#mat = np.array(mat)
#print(mat)

prev = []
for i in range(1,h+1):
    for j in range(1,w+1):
        if mat[i][j]:
            prev.append((i,j))

round = -1
while not len(prev) ==  0:
    #print(prev)
    #print(mat)
    round += 1
    next = []
    for (x,y) in prev:
        if not mat[x-1][y]:
            next.append((x-1,y))
            mat[x-1][y] = True
        if not mat[x][y-1]:
            next.append((x,y-1))
            mat[x][y-1] = True
        if not mat[x+1][y]:
            next.append((x+1,y))
            mat[x+1][y] = True
        if not mat[x][y+1]:
            next.append((x,y+1))
            mat[x][y+1] = True
    prev = next

print(round)


### FIXED CODE ###

import functools as ft

h,w = map(int, input().split())
mat = [[True] * (w+2)]
for _ in range(h):
    mat.append([True] + [a == '#' for a in input()] + [True])
mat.append([True]*(w+2))

prev = []
for i in range(1,h+1):
    for j in range(1,w+1):
        if mat[i][j]:
            prev.append((i,j))



round = -1
while prev:
    round += 1
    #print(prev)
    #print(mat)
    def calc(next, tup):
        x = tup[0]
        y = tup[1]
        if not mat[x-1][y]:
            next.append((x-1,y))
            mat[x-1][y] = True
        if not mat[x][y-1]:
            next.append((x,y-1))
            mat[x][y-1] = True
        if not mat[x+1][y]:
            next.append((x+1,y))
            mat[x+1][y] = True
        if not mat[x][y+1]:
            next.append((x,y+1))
            mat[x][y+1] = True
        return next
    next = ft.reduce(calc, prev, [])

    prev = next

print(round)
def main():

n=input()
a=map(int,input().split)
d=1

if 0 in a:
  print(0)
  return

for b in a:
  d=d*b
  
  if d>10**18:
    print("-1")
    return
print(d)

def main():

### FIXED CODE ###

def main():

	n=input()
	a=list(map(int,input().split()))
	
	
	if 0 in a:
		print(0)
		return

	d=1
    
	

	for b in a:
		d=d*b
		if d>10**18:
			print("-1")
			return
	print(d)

main()
x = int(input())
for a in range(10**4):
    for b in range(-10**4,10**4):
        if a**5 - b**5 == X:
            print(a,b)
            break
    else:
        continue
    break

### FIXED CODE ###

X = int(input())
for a in range(10**4):
    for b in range(-10**4,10**4):
        if a**5 - b**5 == X:
            print(a,b)
            break
    else:
        continue
    break
from itertools import zip_longest
import sys

sys.maxsize
N, M, K = map(int, input().split())
A = [int(a) for a in input().split()]
B = [int(b) for b in input().split()]
# iter_A = iter(A)
# iter_B = iter(B)
S = sum(A) + sum(B)
S_len = len(A) + len(B)
if K >= S:
    print(S_len)
else:
    ans = 0
    a_index = 0
    b_index = 0
    while K >= 0:
        for i in range(max(len(A), len(B))):
            if K < 0:
                break
            if A[a_index] <= B[b_index]:
                if K < 0:
                    break
                K -= A[a_index]
                a_index += 1
                ans += 1
            elif A[a_index] > B[b_index]:
                if K < 0:
                    break
                K -= B[b_index]
                b_index += 1
                ans += 1
    print(ans - 1)


### FIXED CODE ###

N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

a, b = [0], [0]
for i in range(N):
    a.append(a[i] + A[i])
for i in range(M):
    b.append(b[i] + B[i])
ans, j = 0, M
for i in range(N + 1):
    if a[i] > K:
        break
    while b[j] > K - a[i]:
        j -= 1
    ans = max(ans, i + j)
print(ans)
import sys
from bisect import bisect_left as bl
input = sys.stdin.readline
N = int(input())
a = list(map(int, input().split()))
L = int(input())
k = 0
while a[-1] // (L * pow(2, k)): k += 1
e = [[0] * k for _ in range(N)]
for i in range(N):
  t = L + a[i]
  ok = i
  ng = N
  while ng - ok > 1:
    m = (ok + ng) // 2
    if a[m] <= t: ok = m
    else: ng = m
  e[i][0] = ok
for j in range(len(e[i]) - 1):
  for i in range(N):
    x = e[i][j]
    e[i][j + 1] = e[x][j]
#print(e)

def doubling(u, v):
  if u == v: return 0
  x = min(len(e[u]) - 1, bl(e[u], v))
  #print(u, v, x)
  return doubling(e[u][x], v) + pow(2, x)

Q = int(input())
for _ in range(Q):
  x, y = map(int, input().split())
  x -= 1
  y -= 1
  if x > y: x, y = y, x
  print(doubling(x, y))

### FIXED CODE ###

import sys
input = sys.stdin.readline
N = int(input())
a = list(map(int, input().split()))
L = int(input())
k = 1
while a[-1] // (L * pow(2, k)): k += 1
e = [[0] * k for _ in range(N)]
for i in range(N):
  t = L + a[i]
  ok = i
  ng = N
  while ng - ok > 1:
    m = (ok + ng) // 2
    if a[m] <= t: ok = m
    else: ng = m
  e[i][0] = ok
for j in range(len(e[i]) - 1):
  for i in range(N):
    x = e[i][j]
    e[i][j + 1] = e[x][j]
#print(e)

def doubling(u, v):
  if u == v: return 0
  ok = -1
  ng = len(e[u])
  while ng - ok > 1:
    m = (ok + ng) // 2
    if e[u][m] < v: ok = m
    else: ng = m
  if ok < 0: return 1
  return doubling(e[u][ok], v) + pow(2, ok)

Q = int(input())
for _ in range(Q):
  x, y = map(int, input().split())
  x -= 1
  y -= 1
  if x > y: x, y = y, x
  print(doubling(x, y))
import sys
from collections import defaultdict
from collections import deque
import numpy as np
import heapq
from heapq import heappush, heappop
import itertools


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

N = int(input())

PATH = []
#COLOR = [[None for _ in range(N+1)] for _ in range(N+1)]
COLOR = defaultdict(int)
PT = [[] for _ in range(N+1)]
cmax = 1
for i in range(N-1):
    a, b = map(int, input().split())
    PATH.append((a, b))
    PT[a].append(b)
    PT[b].append(a)

    la = len(PT[a])
    lb = len(PT[b])

    l = la if la > lb else lb
    if l > cmax:
        cmax = l


q = deque([(1, 0)])

while(q):
    a, ca = q.popleft()
    bs = PT[a]

    c = list(range(1, cmax+1))
    for b in bs:
        if b > a:
            na = a
            nb = b
        else:
            na = b
            nb = a

        if COLOR[(na, nb)] == 0:
            clr = c.pop()
            if clr == ca:
                clr = c.pop()

            COLOR[(na, nb)] = clr
            q.append((b, clr))

print(cmax)

clr = []
for a, b in PATH:
    clr.append(str(COLOR[(a, b)]))

print("\n".join(clr))


### FIXED CODE ###

import sys
from collections import defaultdict
from collections import deque
import numpy as np
import heapq
from heapq import heappush, heappop
import itertools


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

N = int(input())

PATH = []
#COLOR = [[None for _ in range(N+1)] for _ in range(N+1)]
COLOR = defaultdict(int)
PT = [[] for _ in range(N+1)]
cmax = 1
for i in range(N-1):
    a, b = map(int, input().split())
    PATH.append((a, b))
    PT[a].append(b)
    PT[b].append(a)

    '''
    la = len(PT[a])
    lb = len(PT[b])

    l = la if la > lb else lb
    if l > cmax:
        cmax = l
    '''

q = deque([(1, -1)])
while(q):
    a, ng = q.popleft()
    bs = PT[a]

    c = 1
    for b in bs:
        if b > a:
            na = a
            nb = b
        else:
            na = b
            nb = a

        cab = COLOR[(na, nb)]

        if cab == ng:
            continue

        if cab == 0:
            if c == ng:
                c += 1
            clr = c
            COLOR[(na, nb)] = clr
            q.append((b, clr))
            c += 1

print(max(COLOR.values()))

clr = []
for a, b in PATH:
    clr.append(COLOR[(a, b)])

print("\n".join(map(str, clr)))
n,m=map(int,input().split())
a=[0]*m
for i in range(m):
	a[i]=int(input())
	
def pattern(n):
	if n==0:
		return 1
	if n==1:
		return 1
	return pattern(n-1)+pattern(n-2)

def renzoku(m):
	total=0
	for i in range(m-1):
		if a[i]==a[i+1]-1:
			total=1
			break;
	return total
	
if renzoku(m):
	print(0)
	
elif m==0:
	print(pattern(n))
	
else:
	total=pattern(n-a[m-1]-1)*pattern(a[0]-1)%1000000007
	for i in range(m-1):
		total*=pattern(a[i+1]-a[i]-2)
	print(total%1000000007)

### FIXED CODE ###

n,m=map(int,input().split())
dp=[-1 for i in range(n+1)] #dp[i]=はi段目
for i in range(m):
	a=int(input())
	dp[a]=0
dp[0]=1
if dp[1]<0:
	dp[1]=1
for i in range(2,n+1):
	if dp[i]<0:
		dp[i]=(dp[i-1]+dp[i-2])%1000000007
print(dp[n]%1000000007)
l = map(int, raw_input().split())
A, B, X = l[0], l[1], l[2]

if A <= X and A + B >= X:
    print('YES')
else:
    print('NO')

### FIXED CODE ###

l = list(map(int, input().split()))
A, B, X = l[0], l[1], l[2]

if A <= X and A + B >= X:
    print('YES')
else:
    print('NO')
# coding: utf-8
# Your code here!
import sys
def input():
    return sys.stdin.readline()
n,m=map(int,input().split())
a=[0]*(n+1)
b=[0]*(n+1)
f1=[]
f2=[]
for i in range(m):
    a[i],b[i]=map(int,input().split())
    if a[i]==1:
        f1.append(b[i])
    if b[i]==n:
        f2.append(i)
        

ans='IMPOSSIBLE'
for i in f2:
    if a[i] in f1:
        ans='POSSIBLE'
print(ans)


### FIXED CODE ###

# coding: utf-8
# Your code here!
import sys
def input():
    return sys.stdin.readline()
n,m=map(int,input().split())
a=[0]*(m+1)
b=[0]*(m+1)
c=[0]*(n+1)
f1=[]
f2=[]
for i in range(m):
    a[i],b[i]=map(int,input().split())
    if a[i]==1:
        c[b[i]]=1

ans='IMPOSSIBLE'
for i in range(m):
    if b[i]==n:
        if c[a[i]]==1:
            ans='POSSIBLE'
print(ans)
import math
A,B=map(int,input().split())
a=int(math.log(A,2))+1
b=int(math.log(B,2))
if a>=b:
  ans=0
  for i in range(A,B+1):
    ans^=i
else:
  ans=0
  for i in range(A,2**a):
    ans^=i
  for j in range(2**b,B+1):
    ans^=j
print(ans)

### FIXED CODE ###

A,B=map(int,input().split())
def f(X):
  if X%4==0:
    return X
  elif X%4==1:
    return 1
  elif X%4==2:
    return 1^X
  elif X%4==3:
    return 0
if A==0:
  ans=f(B)
else:
  ans=f(A-1)^f(B)
print(ans)
A, B = map(int, input().split())

if A > B*2:
  print(A - B*2)
  else:
    print(0)

### FIXED CODE ###

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

if A > B*2:
  print(A - B*2)
else:
  print(0)
N, X = map(int,input().split())
L = list(map(int,input().split()))

cnt = 0
total = 0
i = 0

while total <= X:
    cnt += 1
    total += L[i]
    i += 1

print(cnt)

### FIXED CODE ###

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

cnt = 0
total = 0

for i in range(N):
    if total <= X:
        cnt += 1
        total += L[i]
    else:
        break
else:
    if total <= X:
        cnt += 1


print(cnt)
## N, K = map(int, input().split())
c = []
d = 0
for _ in range(N):
    a, b= map(int, input().split())
    for i in range(b):
        c.append(a)
    d += b
    if d <= K-1:
        break
print(sorted(c)[K-1])

### FIXED CODE ###

N, K = map(int, input().split())
num = [0]*(10**5+1)
for i in range(N):
    a, b= map(int, input().split())
    num[a] += b
for i in range(1, 10**5+1):
    if K <= num[i]:
        print(i)
        exit()
    K -= num[i]
import sys
from collections import deque

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))


def solve():
    h, w, k = nm()
    sy, sx, gy, gx = nm()
    d = [(0, 1), (1, 0), (-1, 0), (0, -1)]
    sx -= 1; sy -= 1
    gx -= 1; gy -= 1
    C = [ns() for _ in range(w)]
    G = [[10**7]*w for _ in range(w)]
    G[sy][sx] = 0
    q = deque([(sy, sx)])
    while q:
        y, x = q.popleft()
        for i in range(4):
            dy, dx = d[i]
            ny, nx = y, x
            for _ in range(k):
                ny += dy; nx += dx
                if ny < 0 or w <= ny or nx < 0 or w <= nx:
                    break
                if C[ny][nx] == '@' or G[ny][nx] <= G[y][x]:
                    break
                if G[ny][nx] > G[y][x] + 1:
                    G[ny][nx] = G[y][x] + 1
                    q.append((ny, nx))
    ans = G[gy][gx]
    print(ans if ans < 10**7 else -1)
    return

solve()


### FIXED CODE ###

import sys
from collections import deque

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))


def solve():
    h, w, k = nm()
    sy, sx, gy, gx = nm()
    d = [(0, 1), (1, 0), (-1, 0), (0, -1)]
    sx -= 1; sy -= 1
    gx -= 1; gy -= 1
    C = [ns() for _ in range(h)]
    G = [[10**7]*w for _ in range(h)]
    G[sy][sx] = 0
    q = deque([(sy, sx)])
    while q:
        y, x = q.popleft()
        for i in range(4):
            dy, dx = d[i]
            ny, nx = y, x
            for _ in range(k):
                ny += dy; nx += dx
                if ny < 0 or h <= ny or nx < 0 or w <= nx:
                    break
                if C[ny][nx] == '@' or G[ny][nx] <= G[y][x]:
                    break
                if G[ny][nx] > G[y][x] + 1:
                    G[ny][nx] = G[y][x] + 1
                    q.append((ny, nx))
    ans = G[gy][gx]
    print(ans if ans < 10**7 else -1)
    return

solve()
X=int(input())
a=100
for i in range(1,1000000000000000000):
  s=int(0.01*a)
  a+=s
  if X<=a:
    print(i)
    

### FIXED CODE ###

X=int(input())
a=100
for i in range(1,10**18):
  s=int(0.01*a)
  a+=s
  if X<=a:
    print(i)
    break
n,T = map(int, input())
ans = 1000
for i in range(n):
  c,t = map(int, input())
  if t <= T:
    ans = min(ans, c)
print(ans)

### FIXED CODE ###

n,T = map(int, input().split())
ans = 1001
for i in range(n):
  c,t = map(int, input().split())
  if t <= T:
    ans = min(ans, c)

if ans == 1001:
  print("TLE")
else:
  print(ans)
a = input().split()
a2 = 0
for i in range(len(a)):
    a2 += int(a[i])
print(a2)
if a2 >= bust:
    print('win')
elif a2 <= 21:
    print('win')

### FIXED CODE ###

a = input().split()
a2 = 0
for i in range(len(a)):
    a2 += int(a[i])
#print(a2)
if a2 >= 22:
    print('bust')
elif a2 <= 21:
    print('win')
def main(n, xs):
    # type: (int, List[int]) -> None
    even = lambda x: x % 2 == 0 # type: Callable[[int],bool]
    allEven = lambda xs: all(map(even, xs)) # type: Callable[[List[int]],bool]
    cnt = 0
    while allEven(xs):
        cnt = cnt + 1
        xs = list(map(lambda x: x // 2, xs))
    return

if __name__ == '__main__':
    # main(sys.argv[1:])
    n = int(input())
    xs = list(map(lambda _: int(input()), range(n)))
    main(n, xs)


### FIXED CODE ###

def main(n, xs):
    # type: (int, List[int]) -> None
    even = lambda x: x % 2 == 0 # type: Callable[[int],bool]
    allEven = lambda xs: all(map(even, xs)) # type: Callable[[Iterable[int]],bool]
    cnt = 0
    while allEven(xs):
        cnt = cnt + 1
        xs = list(map(lambda x: x // 2, xs))
    print(cnt)
    return

if __name__ == '__main__':
    # main(sys.argv[1:])
    n = int(input())
    xs = list(map(int, input().split()))
    main(n, xs)
from collections import Counter

N=int(input())
dic＝{}

ans=0

for i in range(N):
    si=input()
    # ci=Counter(si)
    # c=sorted(ci.elements())
    # c=sorted(Counter(si).elements())
    sorted_s=''.join(sorted(Counter(si).elements()))
    if sorted_s in dic:
        ans+=dic[sorted_s]
        dic[sorted_s]]+=1
    else:
        dic[sorted_s]=1

print(ans)

### FIXED CODE ###

from collections import Counter

N=int(input())
dic={}

ans=0

for i in range(N):
    si=input()
    # ci=Counter(si)
    # c=sorted(ci.elements())
    # c=sorted(Counter(si).elements())
    sorted_s=''.join(sorted(Counter(si).elements()))
    if sorted_s in dic:
        ans+=dic[sorted_s]
        dic[sorted_s]+=1
    else:
        dic[sorted_s]=1
print(ans)
echo(r^2*3)

### FIXED CODE ###

r = int(input())
print(r**2*3)
a, b, c = [int(x) for x in input().split()
a, b = b, a
a, c = c, a
print (a,b,c)

### FIXED CODE ###

a, b, c = [int(x) for x in input().split()]
a, b =b, a
a, c = c, a
print (a,b,c)
nums = input().strip().split()
print(sum(nums)-sum(set(nums)))

### FIXED CODE ###

nums = map(int, input().split())
d = {}
for n in nums:
  d.setdefault(n, 0)
  d[n] += 1
print(list(d.keys())[list(d.values()).index(1)])
n=int(input())
a=list(map(int,input()))
b=[]
c=[]
for i in range(n):
  if i%2==0:
    b.append(a[i])
  else:
    c.append(a[i])
b.reverse()
b.extend(c)
print(' '.join(map(str,b)))

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
b=[]
c=[]
for i in range(n):
  if i%2!=n%2:
    b.append(a[i])
  else:
    c.append(a[i])
b.reverse()
b.extend(c)
print(' '.join(map(str,b)))
N,A,B = map(int,input().split())
print(min(n*a, b))

### FIXED CODE ###

n, a, b = map(int, input().split())
print(min(n*a, b))
import functools
import fractions
N = int(input())
A_list = list(map(int, input().split()))
ans = 0

for i in range(1,N+1):
    x = A_list[-i]
    del A_list[-i]
    gcd = functools.reduce(fractions.gcd, A_list)
    ans = max(gcd,ans)
    A_list.append(x)
print(ans)



### FIXED CODE ###

A,B,T = map(int, input().split())
ans = B*int(T/A)
print(ans)