Harryxun/stf_run huggingface dataset:
listnum = int(input())
string = input()

halfnum = listnum / 2
halfstr = string[0:halfnum]
if string == halfstr + halfstr:
	print('Yes')
else:
	print('No')

### FIXED CODE ###

listnum = int(input())
string = input()

halfnum = listnum // 2
halfstr = string[0:halfnum]
if string == halfstr + halfstr:
	print('Yes')
else:
	print('No')
from  collections import deque

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

A = deque(A)
B = deque(B)

ans = 0
while True:
  a = A[0]
  b = B[0]
  if min(a, b) > K:
    break
  else:
    if a <  b:
      a = A.popleft()
      K -= a
      ans += 1
    else:
      b = B.popleft()
      K -= b
      ans += 1
  #print(ans,  K)
      
      
print(ans)

### FIXED CODE ###

from bisect import *
 
N, M, K =map(int, input().split())
A  = list(map(int, input().split()))
B  = list(map(int, input().split()))

A_= [0]
for a in A:
  A_.append(A_[-1] + a)
#print(A_)

b_sum = 0
ans = 0
b_cnt = 0

while True:
  if b_sum > K:
    break
  else:
    k = K - b_sum
    ans = max(bisect_right(A_, k)-1 + b_cnt, ans)
    #print(bisect_right(A_, k)-1 + b_cnt, ans,  b_cnt)
    if b_cnt == M:
      break
    b_sum += B[b_cnt]
    b_cnt += 1
    

print(ans)
a = list(input())
s1,s2,s3 = a[0],a[1],a[2]

count = 0
for i=range(a):
    count += a[i]

print(count)


### FIXED CODE ###

a = list(input())
s1,s2,s3 = a[0],a[1],a[2]

count = 0
for i in range(len(a)):
    count += int(a[i])

print(count)
n = int(input())
s = input()

ce = {}
#iより右に居て，東を向いている人の数
def counte(s,i):
    if i in ce:
        return ce[i]
    elif i == n-1:
        return 0
    else:
        ce[i] = counte(s,i+1) + s[i+1:i+2].count("E")
        return ce[i]

cw = {}
#iより←に居て，西を向いている人の数
def countw(s,i):
    if i in cw:
        return cw[i]
    elif i == 0:
        return 0
    else:
        cw[i] = countw(s,i-1) + s[i-1:i].count("W")
        return cw[i]

minew = n
for i in range(0,n):
    ew = counte(s,i)+countw(s,i)
    if ew < minew:
        minew = ew
print(minew)

### FIXED CODE ###

n = int(input())
import sys
sys.setrecursionlimit(1000000+1)
s = input()

ce = {}
#iより右に居て，東を向いている人の数
def counte(s,i):
    if i in ce:
        return ce[i]
    elif i == n-1:
        return 0
    else:
        ce[i] = counte(s,i+1) + s[i+1:i+2].count("E")
        return ce[i]

cw = {}
#iより←に居て，西を向いている人の数
def countw(s,i):
    if i in cw:
        return cw[i]
    elif i == 0:
        return 0
    else:
        cw[i] = countw(s,i-1) + s[i-1:i].count("W")
        return cw[i]

minew = n
for i in range(0,n):
    ew = counte(s,i)+countw(s,i)
    if ew < minew:
        minew = ew
print(minew)
st = input()
for i in range(0x61,0x7b):
    print("%c : %d", %(i,st.count(chr(i))))


### FIXED CODE ###

import sys

data = sys.stdin.read()
for i in range(0x61,0x7b):
    print("%c : %d"  %(i,data.lower().count(chr(i))))
N = int(input())
S = list(input().rstrip())

count_list = []
for i in range(N):
    count = 0
    for j in range(i):
        if S[j] == 'W':
            count += 1
    for j in range(N-i-1):
        if S[i+j+1] == 'E':
            count += 1

    
    count_list.append(count)

print(min(count_list))

### FIXED CODE ###

a = input().rstrip().split()
A = int(a[0])
B = int(a[1])

print(max(A+B, A-B,A*B))
from itertools import  product
N,M,X = map(int,input().split())
ca = [list(map(int,input().split())) for _ in range(N)]
for i in range(1,M+1):
    count=0
    for j in range(N):
        count+=ca[j][i]
    if count<X:
        print(-1)
        exit()

ans = 10**9
for z in product((0, 1), repeat=N):#bit全探索のくみあわせを勝手に作ってくれるので使うとよい
    count=0
    count2=[0]*M
    for i in range(N):
        if z[i]==1:
            count+=ca[i][0]
            for j in range(1,M+1):
                count2[j-1]+=ca[i][j]
    
    for i in range(m):
        if count2[i]<x:
            break
    else:
        ans=min(count,ans)
print(ans)


### FIXED CODE ###

from itertools import  product
N,M,X = map(int,input().split())
ca = [list(map(int,input().split())) for _ in range(N)]
for i in range(1,M+1):
    count=0
    for j in range(N):
        count+=ca[j][i]
    if count<X:
        print(-1)
        exit()

ans = 10**9
for z in product((0, 1), repeat=N):#bit全探索のくみあわせを勝手に作ってくれるので使うとよい
    count=0
    count2=[0]*M
    for i in range(N):
        if z[i]==1:
            count+=ca[i][0]
            for j in range(1,M+1):
                count2[j-1]+=ca[i][j]
    
    for i in range(M):
        if count2[i]<X:
            break
    else:
        ans=min(count,ans)
print(ans)
S=str(input())
ListNum=[]
ListNUM=[]
for i in range(0,len(S),1):
  if i<len(S)-2:
    Num=100*int(S[i])+10*int(S[i+1])+int(S[i+2])
    NUM=(Num-753)**2
    ListNum.append(Num)
    ListNUM.append(NUM)
posi=ListNUM.index(mini(ListNUM))
print(NUM**(1/2))

### FIXED CODE ###

S=str(input())
ListNum=[]
ListNUm=[]
ListNUM=[]
for i in range(0,len(S),1):
  if i<len(S)-2:
    Num=100*int(S[i])+10*int(S[i+1])+int(S[i+2])
    NUm=Num-753
    NUM=NUm**2
    ListNum.append(Num)
    ListNUm.append(NUm)
    ListNUM.append(NUM)
posi=ListNUM.index(min(ListNUM))

if ListNUm[posi]<0:
  ListNUm[posi]=ListNUm[posi]*(-1)
print(ListNUm[posi])
import numpy as np

n, m = list(map(int, input().split()))
a = [[0] for i in range(n)]
v = [[0] for j in range(m)]
for i in range(n):
    a[i][:] = list(map(int, input().split()))
for j in range(m):
    v[j][0] = int(input())
A = np.matrix(a)
V = np.matrix(v)
B = A * V
for i in range(n):
    print(B[i][0])

### FIXED CODE ###

n, m = list(map(int, input().split()))
A = []
V = []
B = []
for i in range(n):
    A.append(list(map(int, input().split())))
for j in range(m):
    V.append([int(input())])
for i in range(n):
    B.append([0])
    for j in range(m):
            B[i][0] += A[i][j] * V[j][0]
for i in range(n):
    print(B[i][0])
import math

 
A,B,H,M= list(map(int, input().split()))
 
theta = 2*math.pi*H/12+2*math.pi*M/12/60 #時針の角度
phi = 2*math.pi*M/60 #分針の角度
  
C = math.sqrt(A**2+B**2-2*A*B*math.cos(theta-phi))
print(C)

### FIXED CODE ###

'''
1の位が2,4,5,7,9のとき'hon'
1の位が0,1,6,8のとき'pon'
1の位が3のとき'bon'
を出力する．
'''

def kazoekata_enpitsu(N):
    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')

N = int(input())
kazoekata_enpitsu(N)
N = int(input())
A = list(map(int, input().split()))
A.sort()
from bisect import bisect_left
ans = 0
for i in range(N - 1):
    for j in range(i + 1, N):
        ans += bisect_left(A, A[i] + A[j]) - bisect_left(A, A[j]) - 1
print(ans)


### FIXED CODE ###

a, b = map(int, input().split())
print(max(0, a - 2 * b))
a = [[0] * 3001 for i in range(3001)]
dp = [[[0] * 3001 for i in range(3001)] for j in range(5)]
R,C,K = map(int, input().split())

for i in range(K):
  r,c,v = map(int, input().split())
  a[r-1][c-1] = v

for i in range(R):
  for j in range(C):
    for k in range(2, -1, -1):
      dp[i][j][k+1] = max(dp[i][j][k+1], dp[i][j][k]+a[i][j])
    for k in range(4):
      dp[i+1][j][0] = max(dp[i+1][j][0], dp[i][j][k])
      dp[i][j+1][k] = max(dp[i][j+1][k], dp[i][j][k])
    
ans = 0
for k in range(4):
  ans = max(ans, dp[R-1][C-1][k])
print(ans)


### FIXED CODE ###

R,C,K = map(int, input().split())
a = [[0] * (C+1) for i in range(R+1)]
dp = [[[0] * (C+1) for i in range(R+1)] for j in range(4)]
for i in range(K):
  r,c,v = map(int, input().split())
  a[r-1][c-1] = v

for i in range(R):
  for j in range(C):
    for k in range(2, -1, -1):
      dp[k+1][i][j] = max(dp[k+1][i][j], dp[k][i][j]+a[i][j])
    for k in range(4):
      dp[0][i+1][j] = max(dp[0][i+1][j], dp[k][i][j])
      dp[k][i][j+1] = max(dp[k][i][j+1], dp[k][i][j])

    
ans = 0
for k in range(4):
  ans = max(ans, dp[k][R-1][C-1])
print(ans)
import numpy
n=input()
l=list(map(int, input().split()))
res=0
#print(f"le{len(l)}")
l.append(0)
l.reverse()
for i in range(len(l)): 
    print(l[len(l)-1-i],numpy.cumsum(l)[len(l)-i-2])
    res+=l[len(l)-1-i]*numpy.cumsum(l)[len(l)-i-2]
    #print(f"{res}レス")
print(res%(10**9+7))
#print(res)

### FIXED CODE ###

d,t,s=map(int, input().split())
if d/s<=t:
  print("Yes")
else:
  print("No")
import numpy as np
import sys

args = sys.argv
a = args[0]
b = args[1]
c = a * b

if 1 < c and c < 1000:
  if c%2 == 0:
    print("Even")
  else:
    print("Odd")


### FIXED CODE ###

a, b = map(int, input().split())
print("Even" if a*b % 2 == 0 else "Odd")
from math import floor

X = int(input())
D = 100
for i in range(1, X+2):
    if D == X:
        print(i-1)
        break
    D = floor(D * (101/100))

### FIXED CODE ###

X = int(input())
A = 100
i = 1
while True:
    A = int(A*1.01)
    if A >= X:
        print(i)
        break
    else:
        i += 1
n,k=map(int,input().split())
p=list(map(int,input().split()))
new_p=[]
s=[]
ans=-1
for i in range(n):
    new_p.append((((p[i]*(1+p[i]))/2)/p[i]))
s.append(new_p[0])
for i in range(n-1):
    s.append(s[i]+new_p[i+1])
for i in range((len(s)-k)):
    val=s[k+i]-s[i]
    ans=max(ans,max)
print(ans)


### FIXED CODE ###

n,k=map(int,input().split())
p=list(map(int,input().split()))
new_p=[]
s=[]
ans=-(10**9)
for i in range(n):
    new_p.append((1+p[i])/2)
s.append(new_p[0])
for i in range(n-1):
    s.append(s[i]+new_p[i+1])
s.insert(0,0)
for i in range((len(s)-k)):
    val=s[k+i]-s[i]
    ans=max(ans,val)
print(ans)
n,k = map(int, input().split())
 
s1 = n//k
if s1 == 0:
    s1 = k//n
    ans = min(abs(k - n*(s1-1)),abs(k - n*(s1),))
    print(ans)
else:
    ans = min(abs(n - k*(s1+1)),abs(n - k*(s1),))
    print(ans)

### FIXED CODE ###

n,k = map(int, input().split())
s1 = n//k
ans = min(abs(n - k*(s1+1)),abs(n - k*(s1)))
print(ans)
# コンテスト名の要求
S =　input()
 
# 入力されたコンテストではないものを出力
if S == "ABC":
    print("ARC")
elif S == "ARC":
    print("ABC")

### FIXED CODE ###

# コンテスト名の要求
S = input()

# 入力されたコンテストではないものを出力
if S == "ABC":
    print("ARC")
elif S == "ARC":
    print("ABC")
else:
    print("入力内容が正しくありません。")
n, m = map(int, input().split())
pos = []
che = []
for i in range(n):
    a,b=map(int,input().split())
    pos.append([a,b])
for i in range(m):
    a,b=map(int,input().split())
    che.append([a,b])

for i in range(n):
    dis = []
    for j in range(m):
        dis.append(abs(pos[i][0]-che[i][0])+abs(pos[i][1]-che[i][1]))
    print(dis.index(min(dis))+1)

### FIXED CODE ###

n, m = map(int, input().split())
pos = []
che = []
for i in range(n):
    a, b = map(int,input().split())
    pos.append([a,b])
for i in range(m):
    a, b = map(int,input().split())
    che.append([a,b])
 
for i in range(n):
    dis = []
    for j in range(m):
        dis.append(abs(pos[i][0]-che[j][0])+abs(pos[i][1]-che[j][1]))
    print(dis.index(min(dis))+1)
inf = 10000000000

def main():
    h,n = map(int,input().split())
    a=[0 for i in range(n)]
    b=[0 for i in range(n)]
    ans = [inf for i in range(h+1)]
    for i in range(n):
        tmp = list(map(int,input().split()))
        a[i] = tmp[0]
        b[i] = tmp[1]
        ans[a[i]] = b[i]
    
    
    for i in range(len(ans)):
        if ans[i]!=inf:
            for j in range(len(a)):
                index = min(h,a[j]+i)
                if ans[i]+b[j] < ans[index]:
                    ans[index] = ans[i]+b[j]
    print(ans[h])
if __name__=="__main__":
    main()
    

### FIXED CODE ###

INF = 10000000000
a=[0 for i in range(int(1e5))]
b=[0 for i in range(int(1e5))]
ans = [INF for i in range(int(1e5))]

def main():
    h,n = map(int,input().split())
    for i in range(n):
        tmp = list(map(int,input().split()))
        a[i] = tmp[0]
        b[i] = tmp[1]
        index = min(h,a[i])
        if b[i] < ans[index]:
            ans[index] = b[i]
    
    
    for i in range(h):
        if ans[i]!=INF:
            for j in range(n):
                index = min(h,a[j]+i)
                if ans[i]+b[j] < ans[index]:
                    ans[index] = ans[i]+b[j]
    print(ans[h])
if __name__=="__main__":
    main()
neighbor = lambda c, w, h: filter(
    lambda b: 0 <= b[0] <= w and 0 <= b[1] <= h,
    [
        (c[0]-1, c[1]),
        (c[0]+1, c[1]),
        (c[0], c[1]-1),
        (c[0], c[1]+1)
    ]
)

def q_c():
t = raw_input()
W, H = map(int, t.split(' '))
p, q = [], []
for i in xrange(W):
    p.append(int(raw_input()))
for j in xrange(H):
    q.append(int(raw_input()))

has = [[False for i in xrange(H+1)] for j in xrange(W+1)]
has[0][0] = True
Next = [(1, 0), (0, 1)]

cost = 0
for i in xrange(W*H+W+H):
    Min = 100000005
    choose = None
    Next.sort(key=lambda a: min(p[a[0]-1] if a[0] > 0 else 100000005, q[a[1]-1] if a[1] > 0 else 100000005))
    choose = Next[-1]
    Min = min(p[choose[0]-1] if choose[0] > 0 else 100000005, q[choose[1]-1] if choose[1] > 0 else 100000005)
    # for each in Next:
    #     if each[0] > 0:
    #         if p[each[0]-1] < Min:
    #             choose = each
    #             Min = p[each[0]-1]
    #     if each[1] > 0:
    #         if q[each[1]-1] < Min:
    #             choose = each
    #             Min = q[each[1]-1]
    has[choose[0]][choose[1]] = True
    Next = Next[:-1]
    cost += Min
    for every in neighbor(choose, W, H):
        # print every
        if not has[every[0]][every[1]] and every not in Next:
            Next.append(every)
print cost

### FIXED CODE ###


import bisect
cost = 0
t = raw_input()
W, H = map(int, t.split(' '))
p, q = [], []
sum_p = []
for i in xrange(W):
    tmp = int(raw_input())
    p.append((i, tmp))
p.sort(key=lambda a: a[1])
pp = [each[1] for each in p]
for i in xrange(W):
    if not sum_p:
        sum_p.append(pp[i])
    else:
        sum_p.append(sum_p[-1]+pp[i])
cost += sum(pp)
for j in xrange(H):
    new = int(raw_input())
    cost += new
    minus = bisect.bisect_right(pp, new)
    cost += (W-minus) * new
    cost += sum_p[minus-1] if minus > 0 else 0

print cost
import sys
mod = 10 ** 9 + 7

n,m = map(int,input().split())
if n in [0,1]:
    print(1)
    sys.exit()
    
if not m == 0:
    lis = [int(input()) for x in range(m)]
else:
    lis = []
val1 = 1
if 1 in lis:
    val2 = 0
else:
    val2 = 1

if lis[0] == 1:
    flg = lis[1]
    nex = 1
else:
    flg = lis[0]
    nex = 0
print(lis)
for x in range(2,n):
    if x == flg: #x in lis
        #print(flg)
        nex += 1
        try: flg = lis[nex]
        except:flg = 0
        now = 0
    else:
        now = (val1 + val2) % mod
    val1,val2 = val2,now
    
print((val1 + val2) % mod)

### FIXED CODE ###

import sys
mod = 10 ** 9 + 7

n,m = map(int,input().split())
if n in [0,1]:
    print(1)
    sys.exit()
    
if not m == 0: lis = [int(input()) for x in range(m)]
else: lis = [-1]
val1 = 1
if 1 in lis: val2 = 0
else: val2 = 1

if lis[0] == 1 and len(lis) >= 2:
    flg = lis[1]
    nex = 1
else:
    flg = lis[0]
    nex = 0
#print(lis)
for x in range(2,n):
    if x == flg: #x in lis
        #print(flg)
        nex += 1
        try: flg = lis[nex]
        except:flg = 0
        now = 0
    else:
        now = (val1 + val2) % mod
    val1,val2 = val2,now
    
print((val1 + val2) % mod)
s=list(input())
l=[]
for i in range(len(s)-1):
  if s[i]!=s[i+1]:
    l.append(max(i+1,len(s)-i-1))
print(min(l))

### FIXED CODE ###

s=list(input())
l=[len(s)]
for i in range(len(s)-1):
  if s[i]!=s[i+1]:
    l.append(max(i+1,len(s)-i-1))
print(min(l))
def main():
    n,m=map(int,input().split())
    if n==1:
        for a,b in ab:
            print(min(a,b))
    ab=[list(map(int,input().split())) for _ in [0]*m]
    for a,b in ab:
        while a!=b:
            a,b=min(a,b),max(a,b)
            b=(b+n-2)//n
        print(a)
    
main()

### FIXED CODE ###

def main():
    n,m=map(int,input().split())
    ab=[list(map(int,input().split())) for _ in [0]*m]
    if n==1:
        for a,b in ab:
            print(min(a,b))
        return
    for a,b in ab:
        while a!=b:
            a,b=min(a,b),max(a,b)
            b=(b+n-2)//n
        print(a)
    
main()
N=int(input())
a_list=list(map(int,input().split()))
if N%3!=0:
  print("No")
else:
    a=set(a_list)
    a=list(a)
    if 0 in a:
            b=a_list.pop(0)
            if len(b)==len(a_list)*2//3:
                print("Yes")
            else:
                print("No")
    else:
            a1=a[0]
            a2=a[1]
            a3=a[2]
            if a1 ^ a2 ==a3 and a1^a3==a2:
                if a_list.count(a1) ==a_list.count(a2) ==a_list.count(a3):
                    print("Yes")
                else:
                    print("No")
            else:
                print("No")
    else:
        print("No")


### FIXED CODE ###

import copy
N=int(input())
a_list=list(map(int,input().split()))
a=set(a_list)
a=list(a)
if 0 in a:
        if len(a) ==2:
            if a_list.count(0)==len(a_list)//3 or a_list.count(0)==len(a_list)//2:
                    print("Yes")
            else:
                    print("No")
        elif len(a)==1:
            print("Yes")
        else:
                print("No")
else:
        if len(a)==3:
            a1=a[0]
            a2=a[1]
            a3=a[2]
            if a1 ^ a2 ==a3 and a1^a3==a2 and a2^a3==a1:
                if a_list.count(a1) == a_list.count(a2) == a_list.count(a3):
                        print("Yes")
                else:
                        print("No")
            else:
                print("No")
        else:
            print("No")
r=int(input())
data=(1200,2800)
name=('ABC', 'ARC', 'AGC')
if r<data[1]:
  print(name[0])
elif data[1]<=r<data[2]:
  print(name[1])
else:
  print(name[2])

### FIXED CODE ###

r=int(input())

name=('ABC', 'ARC', 'AGC')
if r<1200:
  print(name[0])
elif 1200<=r<2800:
  print(name[1])
else:
  print(name[2])
n = int(input())

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

even = [[int(x),0] for x in range(1,10**5+1)]

odd = [[int(x),0] for x in range(1,10**5+1)]

for i in range(len(c)):
    if i % 2 == 0:
        even[c[i]][1] += 1
    else:
        odd[c[i]][1] += 1

even = sorted(even,key = lambda x:-x[1])
odd = sorted(odd,key = lambda x:-x[1])

if even[0][0] == odd[0][0]:
    print(min(n-even[0][1]-odd[1][1],n-even[1][1]-odd[0][1]))
else:
    print(n-even[0][1]-odd[0][1])


### FIXED CODE ###

n = int(input())

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

even = [[int(x),0] for x in range(10**5+1)]

odd = [[int(x),0] for x in range(10**5+1)]

for i in range(len(c)):
    if i % 2 == 0:
        even[c[i]][1] += 1
    else:
        odd[c[i]][1] += 1

even = sorted(even,key = lambda x:-x[1])
odd = sorted(odd,key = lambda x:-x[1])

if even[0][0] == odd[0][0]:
    print(min(n-even[0][1]-odd[1][1],n-even[1][1]-odd[0][1]))
else:
    print(n-even[0][1]-odd[0][1])
n = list(map(int,input().split()))
a = 0
for i in (1,2):
    if n[0] == n[i]:
        a += 1
if a == 1:
    ans = "Yes"
elif a == 2 or n[1] != n[2]:
    ans = "No"
print(ans)

### FIXED CODE ###

n = list(map(int,input().split()))
a = 0
for i in (1,2):
    if n[0] == n[i]:
        a += 1
if a == 1:
    ans = "Yes"
elif a == 2 or n[1] != n[2]:
    ans = "No"
else:
    ans = "Yes"
print(ans)
n = int(input())
s = input()
k = int(input())
ss = []
for i in range(n):
    if(s[k] != s[i]):
        ss[i] = "*"
    else:
        ss[i] = s[k]
print(''.join(ss))

### FIXED CODE ###

n = int(input())
s = input()
k = int(input())
w = s[k-1]
ss = ""
for i in range(n):
    if(s[i] == w):
        ss += w
    else:
        ss += "*"
print(ss)
N = int(input())
A = list(map(int, input().split()))

def progress():
    for i in range(N):
        hp = A[i]
        for j in range(N):
            if i == j:
                continue
            if A[i] > A[j]:
                A[i] -= A[j]
                progress()
            if min(A) == 1:
                break
        if min(A) == 1:
            break
    return min(A)

ans = progress()
print(ans)

### FIXED CODE ###

import fractions

N = int(input())
A = list(map(int, input().split()))
B = 0
for i in range(N):
    B = fractions.gcd(B, A[i])
print(B)
def lcs_size():
  X = input()
  Y = input()
  
  a = len(X)
  b = len(Y)
  
  c[0][0] = 0
  for i in range(a):
    for j in range(b):
      if X[i] == Y[j]:
        c[i][j] = c[i-1][j-1] + 1
      else:
        c[i][j] = max(c[i-1][j], c[i][j-1])
      maxl = max(maxl, c[i][j])
  
  return maxl

q = input()

for i in range(q):
  print lcs_siz()

### FIXED CODE ###

def lcs_size():
  X = raw_input()
  Y = raw_input()
  a = len(X)
  b = len(Y)
  z2 = [0 for i in range(b+1)]

  for i in range(a):
    ch = X[i]
    z1 = z2 + []
    for j in range(b):
      if ch == Y[j]:
        z2[j+1] = z1[j] + 1
      elif z2[j+1] < z2[j]:
        z2[j+1] = z2[j]

  return z2[-1]

q = input()
for k in range(q):
  print lcs_size()
a=int(input())
b=int(input())
if a<b:
  print('LESS')
elif a=b:
  print('EQUAL')
else:
  print('GREATER')

### FIXED CODE ###

a=int(input())
b=int(input())
if a<b:
  print('LESS')
elif a==b:
  print('EQUAL')
else:
  print('GREATER')
import numpy as np
N = int(input())
A = list(map(int,input().split()))
min = 0
for i in range(N):
    if(i > 0) :
        if np.max(A[:i]) - A[i] > 0:
            min = min + np.max(A[:i]) - A[i]
print(min)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
min = 0
for i in range(N):
    if i == 0:
        max = A[i]
    else :
        if max > A[i] :
            min = min + max - A[i]
        else :
            max = A[i]   
print(min)
N, A, B = map(int, input().split())

counter = [0 for _ in range(N)]
ans = 0
for i in range(N):
    string = str(i)
    for j in range(len(str)):
        counter[i] = counter[i] + string[j]
    if counter[i]>=A and counter[i]<=B:
        ans = ans + i
print(ans)

### FIXED CODE ###

N, A, B = map(int, input().split())
ans = 0

for i in range(1, N+1):
    num_sum = 0
    for j in str(i):
        num_sum += int(j)
    if A<= num_sum <= B:
        ans += i

print(ans)
i = input().split()
j = i[0] * i[1]
if j % 2 == 0:
  print("Even")
else:
  print("Odd")

### FIXED CODE ###

# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
a, b = map(int, input().split())
c = a * b
if c % 2 == 0:
  print("Even")
else:
  print("Odd")
from sys import stdin


def na():
    return map(int, stdin().split())


n, _, c = na()
bs = na()

cnt = 0
for _ in range(n):
    if sum(x * y for x, y in zip(na(), bs)) > -c:
        cnt += 1

print(cnt)


### FIXED CODE ###

from functools import reduce

n, _, c = map(int, input().split())
bs = tuple(map(int, input().split()))

count = 0
for i in range(n):
    if reduce(
        lambda x, y: x + y[0] * y[1],
        zip(bs, map(int, input().split())),
        0,
    ) + c > 0:
        count += 1

print(count)
N, M = map(int, input().split())
AB = [[int(a) for a in input().split()] for _ in range(N)]
AB = sorted(AB, key=lambda x: x[0])

def f(remain_cnt, l):
    if remain_cnt <= l[0][1]:
        return remain_cnt * l[0][0]
    return l[0][0] * l[0][1] + f(remain_cnt - l[0][1], l[1:])

print(f(M, AB))


### FIXED CODE ###

N, M = map(int, input().split())
AB = [[int(a) for a in input().split()] for _ in range(N)]
AB = sorted(AB, key=lambda x: x[0])

sum = 0
remain_cnt = M
i = 0

while(True):
    if remain_cnt <= AB[i][1]:
        sum += remain_cnt * AB[i][0]
        break

    sum += AB[i][0] * AB[i][1]
    remain_cnt -= AB[i][1]
    i += 1

print(sum)
s,t,u=map(int,input().split(','))
print(s,t,u)

### FIXED CODE ###

s,t,u=map(str,input().split(','))
print(s,t,u)
a = [int(input()) for _ in range(5)]
b = 10-min([a[i]%10 for i in range(5) if 0 <a[i]%10])
print(sum([(-(-a[i]//10)) for i in range(5)])*10-b)

### FIXED CODE ###

a = [ int(input()) for _ in range(5)]
n = float("inf")
for i in range(5):
    if 0 < a[i] % 2 < 10:
        n = min(n,a[i] % 10)
else:
    if n == float("inf"):
        n = 10
print(sum([(-a[i]//10)*-10 for i in range(5)]) -(10-n))