peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
n = input()
p = list(int(i) for i in input().split())
count = 1
min_num = min(p[0:1])
for i in range(1,len(p)):
  if(p[i] <= min_num):
    count += 1
    min_num = p[i]

print(count)
# Judge status: Wrong Answer
K = int(input())
S = input()


if len(S) <= K:
    print(S)
else:
    s = S.split(S[K])
    S = s[0]
    S = S + "..."
    print(S)
# Judge status: Accepted
def main():
    L, R = map(int, input().split())
    R = min(R, L + 4038)
    ans = 2018

    for i in range(L, R + 1):
        for j in range(i + 1, R + 1):
            ans = min(ans, (i*j) % 2019)

    print(ans)

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
s=input()
print(s)
if s[-1]=='s':
  print(s+"es")
print(s+"s")
# Judge status: Accepted
def main():
    n = int(input())

    mod = 10**9 + 7

    # すべての組み合わせから、いずれかの条件を満たさないパターンを引く

    pattern = 10 ** n
    not_pattern = (9 ** n) + (9 ** n) - (8 ** n)

    answer = (pattern - not_pattern) % mod

    print(answer)


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
S=list(input())
T=list(input())
if len(set(S))==len(set(T)):
    bufs,buft='',''
    cnts,cntt=1,1
    for i in range(len(S)):
        if bufs!=S[i]: bufs=S[i]; cnts=1
        else: cnts+=1
        if buft!=T[i]: buft=T[i]; cntt=1
        else: cntt+=1
        if cnts!=cnts: print('No'); exit()
    print('Yes')
else:
    print('No')
# Judge status: Accepted
c = [list(map(int, input().split())) for _ in range(3)]
# a2 + b1 = c21
# a2 + b2 = c22
# a2 + b3 = c23
b1, b2, b3 = c[0][0], c[0][1], c[0][2]

if c[1][0] - b1 == c[1][1] - b2 == c[1][2] - b3 and c[2][0] - b1 == c[2][1] - b2 == c[2][2] - b3:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
k = int(input())
n = 0

for i in range(1,k+1):
    a = i**3
    b = (i-1)**3
    c = (a-b)*(k-i+1)
    n += c

print(n)
# Judge status: Accepted
l = list(map(int, input().split()))
l.sort(reverse=True)
if l[0] == 7 and l[1] == 5 and l[2] == 5:
  print('YES')
else:
  print('NO')
# Judge status: Wrong Answer
# coding: utf-8
# Your code here!
cost=list(map(int,input().split()))

for i in range(4):
    cost[i]/=2**(i-2)
    
cost=list(map(int,cost))

N=int(input())

if min(cost)==cost[3]:
    print(((N//2*2)*cost[3]+(N%2)*min(cost[:3])))
else:
    print((min(cost)*N))
# Judge status: Accepted
import sys

def main():

	D,T,S = map(int, input().split())
	
	if D/S <= T:
		print("Yes")
	else:
		print("No")

if __name__ == "__main__":
    main()
# Judge status: Accepted
c_ = [list(map(int,input().split())) for i in range(3)]

a1 = 0
b1 = c_[0][0] - a1
a2 = c_[1][0] - b1
b2 = c_[0][1] - a1
a3 = c_[2][0] - b1
b3 = c_[0][2] - a1

a_ = [a1,a2,a3]
b_ = [b1,b2,b3]

flag = True
for i in range(3):
    for j in range(3):
        if c_[i][j] != a_[i] + b_[j]:
            flag = False

print('Yes' if flag else 'No')
# Judge status: Accepted
from bisect import bisect_left
from itertools import accumulate

N, M = map(int, input().split())
shop = [list(map(int, input().split())) for _ in range(N)]
shop.sort(key=lambda x: x[0])

cnt = 0
ans = 0

for i in range(N):
    cnt += shop[i][1]
    if M <= cnt:
        dif = cnt - M
        ans += shop[i][0] * shop[i][1] - dif * shop[i][0]
        break
    else:
        ans += shop[i][0] * shop[i][1]

print(ans)
# Judge status: Accepted
X,Y = map(int,input().split())
print(X+int(Y/2))
# Judge status: Wrong Answer
A,B=map(int,input().split())

s=0

while B-(A-1)*s+1>0:
     s+=1
print(s)
# Judge status: Wrong Answer
from math import factorial
def combinationsCount(n, r):
    return factorial(n) // (factorial(n - r) * factorial(r))
n,a,b = map(int, input().split())
print((2**n - 1 - combinationsCount(n, a) - combinationsCount(n, b)) / (10e9+7) )
# Judge status: Accepted

s = input()

if len(s) % 2 ==1:
	print('No')
	exit()

if s == "hi"* (len(s) // 2):
	print('Yes')
else:
	print('No')
# Judge status: Accepted
def main():
    n = int(input())
    if n % 10 == 3:
        print('bon')
    elif n % 10 == 0 or n % 10 == 1 or n % 10 == 6 or n % 10 == 8:
        print('pon')
    else:
        print('hon')


if __name__ == "__main__":
    main()
# Judge status: Accepted
x = int(input())

for i in range(1, x+1):
  if i * (i + 1)//2 >= x:
    print(i)
    break
# Judge status: Wrong Answer
import sys
n = int(input())

for i in range(n):
  if i*108//100 == n:
    print(i)
    sys.exit()
    
print(":(")
# Judge status: Accepted
N,T = map(int, input().split())
min_cost = 10**9
for i in range(N):
    c,t = map(int, input().split())
    if T >= t and min_cost > c:
        min_cost = c
if min_cost == 10**9:
    print("TLE")
    exit()
print(min_cost)
# Judge status: Accepted
s = input()

while s!="":
    if s[-5:]=="dream" or s[-5:]=="erase":
        s = s[:-5]
    elif s[-6:]=="eraser":
        s = s[:-6]
    elif s[-7:]=="dreamer":
        s = s[:-7]
    else:
        print("NO")
        exit()
print("YES")
# Judge status: Accepted
import sys 
sys.setrecursionlimit(10**6)
s = input()
def dfs(s):
    while True:
        f = True
        for i in ['dream', 'dreamer', 'erase', 'eraser']:
            if s[-len(i):]==i:
                s = s[:-len(i)]
                if s=='':
                    return True
                f = False
        if f: return False
    
if dfs(s):
    print('YES')
else:
    print('NO')
# Judge status: Accepted
s = input()
n = len(s)//2
ret = 0
for i in range(n):
    if s[i] != s[-(i+1)]:
        ret += 1
print(ret)
# Judge status: Accepted
n = int(input())
ans = 10**5
for i in range(n//2):
    a = i+1
    b = n-a
    tmp = 0
    for i in str(a):
        tmp += int(i)
    for i in str(b):
        tmp += int(i)
    ans = min(ans, tmp)
print(ans)
# Judge status: Wrong Answer
x=int (input())

i=1
c=100
d=100

while x >= d:
  c=c+int(c*0.1)
  d=d+c
  i=i+1



print(i)
# Judge status: Accepted
S = input()
l = {"A", "C", "G", "T"}

ans = 0
tmp = ""
for s in S:
  if s in l:
    tmp += s
    if len(tmp) > ans:
      ans = len(tmp)
  else:
    tmp = ""

print(ans)
# Judge status: Accepted
#!/usr/bin/env python3

S = int(input())

if S == 1 or S == 2 or S == 4:
    print(4)
    exit()

e = S
cnt = 0
while True:
    if e % 2 == 0:
        v = e//2
    else:
        v = 3*e+1
    e = v
    cnt += 1
    if v == 4:
        print(cnt+4)
        exit()
# Judge status: Accepted
from math import ceil
n, h = map(int, input().split())
a = []
b = []
for i in range(n):
    A, B = map(int, input().split())
    a.append(A)
    b.append(B)
ma = max(a)
mb = [i for i in b if i > ma]
mb.sort(reverse=True)
if sum(mb) >= h:
    i = 0
    while h > 0:
        h -= mb[i]
        i += 1
    print(i)
else:
    cnt = len(mb)
    h -= sum(mb)
    print(cnt + ceil(h/ma))
# Judge status: Accepted
n,k = map(int, input().split())
x = list(map(int, input().split()))

s = 10**9
for i in range(n-k+1) :
  m = min(abs(x[i]) +abs(x[i+k-1] - x[i]) , abs(x[i+k-1]) + abs(x[i+k-1] - x[i]))
  if s >m :
    s = m
print(s)
# Judge status: Accepted
N = int(input())
S = input()
for i in S:
  print(chr(65 + (ord(i) - 65 + N) % 26), end = '')
# Judge status: Accepted
N =int(input())
A = list(map(int,input().split()))
leaf = sum(A)

v = [[0,a] for a in A]
v[0][0] = 1
MAX = 2
for i in range(1,N+1):
    v[i][0] = min((v[i-1][0]-v[i-1][1])*2,leaf)
    leaf -= v[i][1]
    MAX *= 2
v

if v[N][0] != v[N][1]:
    print('-1')
    exit()

ans = 0

for a,b in v:
    if a <= 0:
        print('-1')
        exit()
    ans += a

print(ans)
# Judge status: Wrong Answer
S=input()
str_list=["dream","dreamer","erase","eraser"]

S_tmp=""
while True:
  S_tmp=S
  for str in str_list:
    S=S.replace(str,"") #rstrip(str)はだめ
  
  if S_tmp==S:
    break

if S=="":
  print("Yes")
if S!="":
  print("No")
# Judge status: Wrong Answer
a,b,k = map(int,input().split())
for i in range(a,a+k):
  print(i)
for i in range(b-k+1,b+1):
  print(i)
# Judge status: Accepted
N, K = list(map(int,input().split()))
xlist = list(map(int,input().split()))

def f(min1,max1):
  if min1>=0 and max1>=0:
    return abs(max1)
  elif min1<=0 and max1 <=0:
    return abs(min1)
  else:
    return min([-2*min1 + max1,-min1 + 2*max1])

ans = 2*10**9
for i in range(N-K+1):
  min1 = xlist[i]
  max1 = xlist[i+K-1]
  dist =f (min1,max1) 
  if dist < ans :
    ans = dist

print(ans)
# Judge status: Accepted
n, k = map(int, input().split())
rsp = list(map(int, input().split()))
t = input()
ans = 0
d = {'r': 2, 's':0, 'p': 1}
for c in t:
  ans += rsp[d[c]]
for i in range(k):
  prev = t[i]
  seq = 1
  for j in range(i+k, n, k):
    if t[j] == prev:
      seq += 1
    else:
      ans -= rsp[d[prev]] * (seq // 2)
      prev = t[j]
      seq = 1
  ans -= rsp[d[prev]] * (seq // 2)
print(ans)
# Judge status: Accepted
x,y=map(int,input().split())
a=y-x
c=0
b=0
for i in range(1000):
    b=x*2**i
    if b>y:
        break
    else:
        c+=1  
print(c)
# Judge status: Accepted
H1,M1,H2,M2,K = map(int,input().split())
t = (H2*60 + M2) - (H1*60 + M1) - K
print(t)
# Judge status: Accepted
n = int(input())
a = n % 1000
if a == 0:
  print(0)
else:
  print(1000 - a)
# Judge status: Accepted
n=int(input())
l=list(map(int,input().split()))
for i in range(n,0,-1):
  l[i-1]=sum(l[i-1::i])%2
print(sum(l))
print(*[i+1 for i in range(n) if l[i]])
# Judge status: Accepted
a, b, c = map(int, input().split())
if a <= c <= b: print("Yes")
else: print("No")
# Judge status: Accepted
a,b,c,d = map(int,input().split())
if b <= c or d <= a:
  print(0)
elif a <= c:
  print(min(b,d)-c)
elif a >= c:
  print(min(b,d)-a)
# Judge status: Wrong Answer
input_line = input()
Line = input_line.split()
if 500*int(Line[0]) > int(Line[1]):
  print('yes')
else:
  print('no')
# Judge status: Wrong Answer
# For taking integer inputs.
def inp():
    return(int(input()))


# For taking List inputs.
def inlist():
    return(list(map(int, input().split())))


# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable.
def instr():
    s = input()
    return(list(s[:len(s)]))


# For taking space seperated integer variable inputs.
def invr():
    return(map(int, input().split()))


X = inp()
res = 0
for i in range(100, 106):
    d = X % i
    # print(d)
    for i in range(100, 106):
        if d % i == 0:
            res = 1
            break
print(res)
# Judge status: Accepted
if int(input().split('/')[1]) > 4:
    print('TBD')
else:
    print('Heisei')
# Judge status: Accepted
from collections import Counter
from scipy.misc import comb

N = int(input())
A = list(map(int, input().split()))
c = Counter(A)

num = 0
for v in c.values():
  if v > 1:
      num += comb(v, 2,exact=True)
for k in range(N):
  print(int(num - (c[A[k]]-1)))
# Judge status: Accepted
import sys
from collections import Counter

N = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))

counter = Counter(A)
ans = 0
pair = []
for l, count in sorted(counter.items(), reverse=True):
    # print(l, count)
    if count < 2:
        continue
    if count >= 4 and len(pair) == 0:
        pair = [l, l]
        break
    pair.append(l)
    if len(pair) == 2:
        break
if len(pair) == 2:
    print(pair[0] * pair[1])
else:
    print(0)
# Judge status: Accepted
n = int(input())

ans = 0
for i in range(100):
    if n - 4 * i >= 0 and ( n - 4 * i )% 7 == 0:
        ans += 1

#print(ans)

if ans >= 1:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
N = int(input())
A = [int(input()) for _ in range(N)]
MAX = max(A)
AA = A[:]
AA.pop(A.index(MAX))
SECOND = max(AA)
for a in A:
    if a == MAX and a == SECOND:
        print(MAX)
    elif a == MAX and a != SECOND:
        print(SECOND)
    else:
        print(MAX)
# Judge status: Wrong Answer
N, K, S = map(int, input().split())
if N == K:
    print(*[S] * K)
    quit()
if S % 2 == 1:
    ki = S // 2
    gu = S // 2 + 1
    ans = []
    for i in range(K + 1):
        if i % 2 == 0:
            ans.append(ki)
        else:
            ans.append(gu)
else:
    ans = []
    K -= 1
    for i in range(K + 1):
        ans.append(S // 2)
for i in range(N - (K + 1)):
    ans.append(S // 2 + 3)
print(*ans)
# Judge status: Wrong Answer
s = list(map(int,input()))
print(s)
n = len(s)
count1 = 0
count2 = 0
if n == 1:
    print(0) 
else:
    for i in range(n):
        if i % 2 == 0 and s[i] != 0:
            count1 += 1
        elif i%2 !=0 and s[i] != 1:
            count1 += 1
    for i in range(n):
        if i % 2 == 0 and s[i] != 1:
            count2 += 1
        elif i%2 !=0 and s[i] != 0:
            count2 += 1
    print(min(count1,count2))
# Judge status: Accepted
N = int(input())

if N % 2 != 0:
    print(0)

else:
    fives = 0
    power = 0

    while (5 ** (power+1)) <= N:  # Nには5のpower乗まで入る
        power += 1

    for i in range(1, power+1):
        fives += N // (5 ** i) // 2

    print(int(fives))
# Judge status: Accepted
s=input()
if(s.count('A')>=1 and s.count('B')>=1):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
A,s,C = input().split()
print(A[0] + s[0] + C[0])
# Judge status: Wrong Answer
#149d

def win(n):
	if n=='r':
		return p
	elif n=='s':
		return r
	else:
		return s

n,k=map(int,input().split())
r,s,p=map(int,input().split())
t=input()
score=0
for i in t:
	score += win(i)

#hands=list(t)

for i in range(n):
	if i+k<n:
		if t[i]==t[i+k]:
			score-=win(t[i+k])
			t[i+k].upper()
print(score)
# Judge status: Accepted
N,*a = open(0).read().split()

N=int(N)

list1=list(map(int,a))

#print(N)

#print(list1)

a=[]

for i in range(-100,101):
    int1=0
    for n in range(N):
        x = (list1[n]-i)
        y = x**2
        int1+=y
        if n==N-1:
            a.append(int1)
    
#print(a)

#print(max(a))

print(min(a))
# Judge status: Accepted
w, h, n = map(int, input().split())
xl = w
xs = 0
yl = h
ys = 0
for i in range(n):
    x, y, a = map(int, input().split())
    if a == 1:
        xs = max(xs, x)
    elif a == 2:
        xl = min(xl, x)
    elif a == 3:
        ys = max(ys, y)
    elif a == 4:
        yl = min(yl, y)
if (yl <= ys) or (xl <= xs):
    print(0)
else:
    print((yl-ys)*(xl-xs))
# Judge status: Accepted
C= input()

CC = ord(C)
CC = CC +1
out = chr(CC)
print(out)
#chr関数で逆のことができる。
# Judge status: Wrong Answer
a,b = map(int,input().split())
print((a+b)//2)
# Judge status: Accepted
import sys
input = sys.stdin.buffer.readline
INF = 1001001001

N, K = map(int, input().split())
x = list(map(int, input().split()))

ans = INF

for i in range(N-K+1):
    if x[i] < 0:
        neg = -x[i]
    else:
        neg = 0
    if x[i+K-1] > 0:
        pos = x[i+K-1]
    else:
        pos = 0
    tmp = neg + pos + min(neg, pos)
    ans = min(ans, tmp)

print(ans)
# Judge status: Accepted
from fractions import gcd
A, B, K = map(int,input().split())
l = []
for k in range(1, gcd(A, B)+1):
  if all(i % k == 0 for i in [A, B]):
    l.append(k)
print(l[-K])
# Judge status: Accepted
s = input()
ans = 0
if 'RRR' in s:
    ans = 3
elif 'RR' in s:
    ans = 2
elif 'R' in s:
    ans = 1

print(ans)
# Judge status: Wrong Answer
a,b,c= map(int, input().split())
val = a+b+c
if val > 22:
    print("bust")
else:
    print("win")
# Judge status: Wrong Answer
N=int(input())

IJ = [[0] * 10 for i in range(10)]
ans = 0

for i in range(N):
    Top = str(i)[0]
    Btm = str(i)[-1]

    if Btm == '0':
        continue
    
    IJ[int(Top)][int(Btm)] += 1

for i in range(1, 10):
    for j in range(1, 10):
        ans += IJ[i][j] * IJ[j][i]
print(ans)
# Judge status: Wrong Answer
n = int(input())
if n == int("9" * len(str(n))):
    print(9 * len(str(n)))
else:
    print(9 * (len(str(n)) - 1) + int(str(n)[0]) - 1)
# Judge status: Accepted
def resolve():
	n = int(input())
	a = list(map(int, input().split()))
	div4 = 0
	div2 = 0
	divn = 0
	for i in a:
		if i % 4 == 0:
			div4 += 1
		elif i % 2 == 0:
			div2 += 1
		else:
			divn += 1
	if div2 > 0:
		divn += 1
	if div4 + 1 >= divn:
		print('Yes')
	else:
		print('No')
resolve()
# Judge status: Accepted
N = int(input())

L = [2,1]

for i in range(2,N+1):
    L.append(L[i-2]+L[i-1])
#print(L)
print(L[N])
# Judge status: Wrong Answer
n,m=map(int,input().split())
l=[[0,0]]*m
t=[0]*m
tc=0
a=False
for k in range(m):
  l[k]=list(map(int,input().split()))
l.sort()
for k in l:
  if k[0]==1:
    t[tc]=k[1]
    tc+=1
  elif k[1]==n:
    if k[1] in t:
      a=True
      break
if a:
  print("POSSIBLE")
else:
  print("IMPOSSIBLE")
# Judge status: Accepted
n=int(input())
s=input()
if s[0]=="(":
    c=1
    d=1
else:
    c=-1
    d=-1
for i in range(1,n):
    if s[i]=="(":
        d+=1
    else:
        d-=1
        c=min(c,d)
if c<0:
    s="("*(-c)+s
print(s+")"*(s.count("(")-s.count(")")))
# Judge status: Accepted
n,r=map(int,input().split())
ans=r

if n <10:
  ans= r + (100*(10-n))
  
print(ans)
# Judge status: Accepted
sheeps, wolves = input().split(' ') 
if (int(sheeps) > int(wolves)):
    print('safe')
else:
    print('unsafe')
# Judge status: Accepted
N, C, K = map(int, input().split())
T = [0 for _ in range(N)]
for i in range(N):
    T[i] = int(input())
T = sorted(T)

flag = 0
cnt = 0
ans = 0
for i in range(len(T)):
    time = T[i] - T[flag]
    cnt += 1
    if time > K or cnt > C:
        flag = i
        cnt = 1
        ans += 1
print(ans + 1)
# Judge status: Accepted
n,m=map(int,input().split())
a=[input() for i in range(n)]
b=[input() for i in range(m)]
ans="No"
for i in range(n-m+1):
  for j in range(n-m+1):
    if [line[j:j+m] for line in a[i:i+m]]==b:
      ans="Yes"
      break
  if ans=="Yes":
    break
print(ans)
# Judge status: Wrong Answer
n, m = list(map(int, input().split()))
nn = min(n, m)
mm = max(n, m)

if nn == mm:
  if nn == 1:
    print(1)

  else:
    print(max(nn-2, 0) * max(mm-2, 0))
  
else:
  print(max(nn-2, 1) * max(mm-2, 1))
# Judge status: Accepted
n, k, s = map(int, input().split())
ans = []
for i in range(k):
    ans.append(s)
for i in range(n - k):
    if s + 1 <= 10 ** 9:
        ans.append(s + 1)
    else:
        ans.append(1)
print(*ans)
# Judge status: Accepted
import sys

N,M = map(int,input().split())
s = {}
ans = 0

for i in range(N):
	a,b = map(int,input().split())
	if a in s.keys():
		s[a] += b
	else:
		s[a] = b

s = sorted(s.items(), key=lambda x:x[0])
for store in s:
	price = store[0]
	stock = store[1]
	if M == 0: break

	if M - stock >= 0:
		M -= stock
		ans += (stock * price)
	else:
		for i in range(stock):
			M -= 1
			ans += price
			if M == 0:
				print(ans)
				sys.exit()
print(ans)
# Judge status: Accepted
K = int(input())
A, B = map(int, input().split())

def solve():
  for i in range(A, B + 1):
    if i % K == 0:
      return 'OK'
  return 'NG'

print(solve())
# Judge status: Accepted
A,B,C = [int(i) for i in input().split()]
D = max(A,B)
for i in range(1,D+1):
    if A * i % B == C:
        print("YES")
        break
    if A * i % B != C and i == D:
        print("NO")
# Judge status: Wrong Answer
a, b = map(int, input().split())
attack = [int(i) for i in input().split()]
for j in range(b):
    a -= attack[j]
    if a <= 0:
        print("YES")
        break
else:
    print("NO")
# Judge status: Wrong Answer
N, Y = map(int, input().split())
for x in range(N):
  for y in range(N-x):
    z = N - x - y
    if z > 0 and 10000*x + 5000*y + 1000*z == Y:
      print(str(x)+" "+str(y)+" "+str(z))
      exit()
print("-1 -1 -1")
# Judge status: Accepted
s = list(input())
i = len(s)
p = 0
while i >= 3:
    if s[i-1] == s[i-2]:
        i -= 3
        p += 2
    else:
        i -= 1
        p += 1

if i <= 1:
    print(p+i)
else:
    if s[i-1] == s[i-2]:
        print(p+1)
    else:
        print(p+2)
# Judge status: Wrong Answer
def main():
    n, m = map(int,(input().split()))
    if n <= 2 or m <= 2:
        print(0)
    else:
        print((n-2)*(m-2))
    

        


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
N = input()
if N[-1] in ["2","4","5","7","9"]:
  print("hon")
elif N[-1] in  ["1","6","8"]:
  print("pon")
else:
  print("bon")
# Judge status: Wrong Answer
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N = int(input())
ans = []
char = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

while N:
    i = N%26
    ans.append(char[i-1])
    N //= 26
print(''.join(ans[::-1]))
# Judge status: Accepted
n = int(input())
S = input()
T = input()
cnt = 0
for i in range(n):
    if S[n - i - 1:] == T[: i + 1]:
        cnt = i + 1
print(2*n-cnt)
# Judge status: Accepted
a, b = map(int, input().split())
diff = b - a

print((diff + 1)*diff//2 - b)
# Judge status: Wrong Answer
# C - Vacation
import numpy as np

N = int(input())
value = np.zeros((N, 3))
for i in range(N):
    value[i, :] = list(map(int, input().split()))
value = value.tolist()

dp = [0]*3

for a, b, c in value:
    dp = [max(dp[1], dp[2])+a, max(dp[0], dp[2])+b, max(dp[0], dp[1])+c]
    
print(max(dp))
# Judge status: Accepted
m = [list(map(int,input().split())) for _ in range(3)]
n = int(input())

for i in range(n):
    x = int(input())
    for h in range(3):
        for w in range(3):

            if m[h][w] == x: m[h][w] = 0


for i in range(3):
    if sum(m[i]) == 0 :print('Yes'); exit()

for i in range(3):
    if m[0][i] + m[1][i] + m[2][i] == 0: print('Yes'); exit()

if m[0][0] + m[1][1] + m[2][2] == 0: print('Yes'); exit()
if m[0][2] + m[1][1] + m[2][0] == 0: print('Yes'); exit()

print('No')
# Judge status: Wrong Answer
n, m = map(int, input().split())

mat = [[0] * n] * n

for i in range(m):
    a, b = map(int, input().split())
    mat[a - 1][b - 1] = 1
    mat[b - 1][a - 1] = 1


for i in range(n):
    ans = sum(mat[i])
    print(ans)
# Judge status: Wrong Answer
n = int(input())
s = []
for i in range(n):
  s.append(i)

for i in range(n):
  t = 0
  if(s[i] != i + 1):
    t += 1
if(t == 0 or 2):
  print('YES')
else:
  print('NO')
# Judge status: Accepted
import sys
from itertools import accumulate

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, *A = map(int, read().split())

    total = sum(A)
    ans = INF
    s = 0
    for i in range(N-1):
        s += A[i]
        if ans > abs(total - 2 * s):
            ans = abs(total - 2 * s)

    print(ans)
    return


if __name__ == '__main__':
    main()
# Judge status: Accepted
def main():
    n, t = map(int, input().split())

    min_cost = 1001
    for _ in range(n):
        ci, ti = map(int, input().split())
        if ti <= t and ci < min_cost:
            min_cost = ci

    print('TLE' if min_cost == 1001 else min_cost)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
from math import sqrt
n = [int(e) for e in input().split(" ")]
print("Yes" if sqrt(n[0]) + sqrt(n[1]) < sqrt(n[2]) else "No")
# Judge status: Accepted
N, M = map(int, input().split())

a_mat = [input() for _ in range(N)]
b_mat = ''.join([input() for _ in range(M)])


def to_vectors(mat, size=M):
    vectors = []
    for h in range(N-M+1):
        for w in range(N-M+1):
            tmp = [mat[h+i][w:w+M] for i in range(M)]
            vectors.append(''.join(tmp))
    return vectors


if b_mat in to_vectors(a_mat, M):
    print('Yes')
else:
    print('No')
# Judge status: Accepted
x = int(input())
ans = (x // 11) * 2
remains = x % 11
if remains != 0:
    ans += 1
if remains > 6:
    ans += 1
print(ans)
# Judge status: Accepted
a, b, x = map(int, input().split())
A = b//x
B = a//x
if a%x == 0:
    print(A-B+1)
else:
    print(A-B)
# Judge status: Wrong Answer
a,b=map(int,input().split())
if (a*b)&1:print("Even")
else:print("Odd")
# Judge status: Accepted
N,M = map(int, input().split())

X = set()
Y = set()
for i in range(M):
    a,b = map(int, input().split())
    if a == 1:
        X.add(b)
    if b == N:
        Y.add(a)

if (X & Y) == set():
    print('IMPOSSIBLE')
else:
    print('POSSIBLE')
# Judge status: Accepted
a,b,c = map(int,input().split())
if a*c <= b:
    print(c)
else:
    print(b//a)
# Judge status: Accepted
from collections import Counter

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

d = Counter(A)

tmp_2 = []
tmp_4 = []
for k, v in d.items():
    if v >= 4:
        tmp_4.append(k)
    if v >= 2:
        tmp_2.append(k)

ans = 0
tmp_2.sort()
tmp_4.sort()
if len(tmp_4):
    ans = tmp_4[-1]**2
if len(tmp_2) >= 2:
    ans = max(ans, tmp_2[-1]*tmp_2[-2])
print(ans)