Harryxun/stf_run huggingface dataset:
import numpy as np

h,w,k = map(int,input().split())
S = [list(input()) for _ in range(h)]

res = 10**6
for div in range(2**(h-1)):
    cut = []
    for i in range(h-1):
        if ((div >> i) & 1):
            cut.append(i+1)
    fr = 0
    part = []
    for i in range(len(cut)):
        to = cut[i]
        part.append(S[fr:to])
        fr = to
    else:
        part.append(S[fr:])
    comp_arr = []
    for p in part:
        p_ = np.array(p).astype(np.int)
        comp_arr.append(p_.sum(axis=0))
    comp_arr_T = np.array(comp_arr).T
    
    cnt = len(cut)

    tank = [0]*len(comp_arr)
    
    for m in range(w):
        for n in range(len(comp_arr)):
            tank[n] += comp_arr[n][m]

        if any([c>k for c in tank]):
            cnt += 1
            for n in range(len(comp_arr)):
                tank[n] = comp_arr[n][m]

    res = min(res, cnt)
print(res)

### FIXED CODE ###

h,w,k = map(int,input().split())
S = [list(map(int,list(input()))) for _ in range(h)]
ans = 10**9+7
for i in range(1 << (h-1)):
    group = [[0]*w]
    g_id = 0
    group[g_id] = [s+b for s, b in zip(S[0], group[0])]
    for j in range(1, h):
        if (i>>(j-1))&1:
            group.append([0]*w)
            g_id += 1
        group[g_id] = [s+b for s, b in zip(S[j], group[g_id])]
    if not all([all([i <= k for i in b]) for b in group]):
        continue
    cnt = len(group) - 1
    g_cnt = [0] * len(group)
    
    for jj in range(w):
        for g_id in range(len(group)):
            g_cnt[g_id] += group[g_id][jj]
        if any([c > k for c in g_cnt]):
            cnt  += 1
            for g_id in range(len(group)):
                g_cnt[g_id] = group[g_id][jj]
    ans = min(ans, cnt)
print(ans)
a = [[0]*4 for i in range(3)]
b = [0]*4

n, m = map(int,input().split())
for i in range(n):
    a[i] = list(map(int,input().split()))
for j in range(m):
    b[j] = int(input())

c = [0]*int(n)
for i in range(n):
    for j in range(m):
        c[i] += a[i][j] * b[j]

for i in c:
    print(i)


### FIXED CODE ###

n, m = map(int,input().split())
a = [[0]*m for i in range(n)]
b = [0]*m

for i in range(n):
    a[i] = list(map(int,input().split()))
for j in range(m):
    b[j] = int(input())

c = [0]*n
for i in range(n):
    for j in range(m):
        c[i] += a[i][j] * b[j]

for i in c:
    print(i)
from math import factorial
N=int(input())
count=[0]
u=0
s=[sorted(input()) for i in range(N)]
s=sorted(s)
for t in range(N-1):
    if s[t+1]==s[t]:
        count[u]+=1
    else:
        count.append()
for i in range(u):
    a=factorial(u)/factorial(2)/factorial(u-2)
print(a)

### FIXED CODE ###

N=int(input())
S=[''.join(sorted((input()))) for i in range(N)]
P={}
for i in range(N):
    if S[i] in P:
        P[S[i]]+=1
    else:
        P[S[i]]=0
for i in P.keys():
    if P[i]>=2:
        P[i]=P[i]*(P[i]+1)/2
print(int(sum(P.values())))
a,b,c=input().split()
print('NYOE S'[[a[-1]==b[0] and b[-1]==c[0]]::2])

### FIXED CODE ###

a,b,c=input().split();print('NYOE S'[a[-1]==b[0]and b[-1]==c[0]::2])
a = [int(input()) for i in range(5)]
ans = 0
cnt = []
for i in a:
  if i % 10 !=0:
    ans += i + (10-i%10)
    cnt.append(10-i%10)
  else:
    ans += i
print(ans-max(cnt))

### FIXED CODE ###

a = [int(input()) for i in range(5)]
ans = 0
cnt = [0]
for i in a:
  if i % 10 !=0:
    ans += i + (10-i%10)
    cnt.append(10-i%10)
  else:
    ans += i
print(ans-max(cnt))
import sys
from collections import deque
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n, k = na()
s = input()
s = s + "2"
li_0 = []
li_1 = []
ct = 1
for i in range(n):
    if s[i] != s[i+1]:
        if s[i] == '0':
            li_0.append(ct)
            ct = 1
        else:
            li_1.append(ct)
            ct = 1
    else:
        ct += 1
if len(li_0) <= k:
    print(len(s)-1)
else:
    li_0 = deque(li_0)
    li_1 = deque(li_1)
    if s[0] == "0":
        li_1.appendleft(0)
    li_1.append(0)
    Sum_0 = sum(li_0[i] for i in range(k))
    Sum_1 = sum(li_1[i] for i in range(k+1))
    Max = Sum_0 + Sum_1
    for i in range(len(li_1)-k-1):
        Sum_0 = Sum_0 - li_0[i] + li_0[i+k]
        Sum_1 = Sum_1 - li_1[i] + li_1[i+k+1]
        Max = max(Max, Sum_0 + Sum_1)
    print(Max)








### FIXED CODE ###

n, k = list(map(int, input().split()))
s = input()
now = 1
cnt = 0
Nums = []
for i in range(len(s)):
    if s[i] == str(now):
        cnt += 1
    else:
        Nums.append(cnt)
        now = 1 - now
        cnt = 1
if cnt != 0:
    Nums.append(cnt)
if len(Nums) % 2 == 0:
    Nums.append(0)

ans = 0
Add = 2 * k + 1

left = 0
right = 0
tmp = 0

for i in range(len(Nums))[::2]:
    Nextleft = i
    Nextright = min(i + Add, len(Nums))

    while Nextleft > left:
        tmp -= Nums[left]
        left += 1

    while Nextright > right:
        tmp += Nums[right]
        right += 1

    ans = max(tmp, ans)
print(ans)
while 1:
	if h==0 and w==0:
		break
	h,w = [int(x) for x in input().split()]
	for i in range(h):
		print("#"*w)
	print("")



### FIXED CODE ###

while 1:
	h,w = [int(x) for x in input().split()]
	if h==0 and w==0:
		break
	for i in range(h):
		print("#"*w)
	print("")
sfdsad

### FIXED CODE ###

A,B=map(int, input().split())
print(max(A+B,A-B,A*B))
N,M = map(int,input().split())
A = []

#フィボナッチ数列
from functools import lru_cache
@lru_cache(maxsize=None)
def Fib(n):
    if n == 1:
        return 1
    elif n == 2:
        return 1
    else:
        return Fib(n-1) + Fib(n-2)

      
for i in range(M):
  a = int(input())
  A.append(a)
#ans = {0~a1-1 a1+1~a2-1 ... a(M-1)+1~aM-1 の行き方の積}
#各a(i)+1~a(i+1)-1への行き方は1通り
#i ~ i+Nへの行き方 Fib(N+1)通り



ans = 0
for i in range(M+1):
  if(i == 0):
    n = (A[i]-1) - 0
    #print(0,(A[i]-1))  
  elif(i == M):
    n = N-(A[M-1]+1)
    #print(N,A[M-1]+1)
  else:
    n = (A[i]-1)-(A[i-1]+1)
    #print((A[i]-1),(A[i-1]+1))
    
  if(n < 0):
    ans = 0
    break
    
  if(n != 0):
   if(ans == 0): ans += (Fib(n+1))%(10**9+7)
   else: ans = (ans*Fib(n+1))%(10**9+7)
print(ans)
    
    
  

### FIXED CODE ###

N,M = map(int,input().split())
A = []

#フィボナッチ数列
def Fib(n):
    a, b = 1, 1
    if n == 0:
        return 0
    elif n== 1:
        return 1
    elif n == 2:
        return 1
    else:
        for i in range(n-2):
            a, b = b, a + b
        return b
 
for i in range(M):
  a = int(input())
  A.append(a)
#ans = {0~a1-1 a1+1~a2-1 ... a(M-1)+1~aM-1 の行き方の積}
#各a(i)+1~a(i+1)-1への行き方は1通り
#i ~ i+Nへの行き方 Fib(N+1)通り

#REになっていた理由:
#・Fib(0)が定義されていなかったから
#・フィボナッチ数列を再帰的(=Fib(n-1)+Fib(n-2))で定義していると、
#Nが大きい(100000とか）のときに深く潜りすぎるのでRE

if(N == 1): 
 ans = 1
elif(M == 0): 
 ans = Fib(N+1)
else: 
 ans = 0
 for i in range(M):  
    if(i == 0): #0~ a1-1 // ai+1 = A[i]
      n = (A[i]-1)-0
      #print(0,A[i]-1)
    else:
      n = (A[i]-1)-(A[i-1]+1) 
      #print(A[i-1]+1,A[i]-1)
      
    if(i != 0): #「渡れない箇所が二連続」が存在するなら0通り
     dif = A[i]-A[i-1]
     if(dif == 1):
       ans = 0
       break
          
    if(ans == 0): ans += (Fib(n+1)%(10**9 + 7))
    else: ans = ans*(Fib(n+1)%(10**9 + 7))

 n = N - (A[M-1]+1)#最後にaM + 1 ~ N のルートも考慮する
 ans = ans*(Fib(n+1)%(10**9 + 7))
 #print(A[M-1]+1,N)
            
ans = ans%(10**9 + 7)
print(ans)
n,k= map(int,input().split())
Xl = list(map(int,input().split()))
from collections import Counter
Xdic = Counter(xl)
valuelist = sorted(list(Xdic.values()), reverse=True)
print(sum(valuelist[k:]))

### FIXED CODE ###

n,k= map(int,input().split())
Xl = list(map(int,input().split()))
from collections import Counter
Xdic = Counter(Xl)
valuelist = sorted(list(Xdic.values()), reverse=True)
print(sum(valuelist[k:]))
H, W = [int(_) for _ in input().split()]
S = [input() for _ in range(H)]

di = (1, 0, -1, 0)
dj = (0, 1, 0, -1)
visited = [[False] * W for _ in range(H)]

b, w = 0, 0

def dfs(i, j):
    global b, w

    if visited[i][j]:
        return 0, 0
    visited[i][j] = True

    if S[i][j] == '#':
        b += 1
    else:
        w += 1

    for d in range(4):
        ni, nj = i + di[d], j + dj[d]
        if ni < 0 or H <= ni or nj < 0 or W <= nj:
            continue
        if S[i][j] == S[ni][nj]:
            continue
        dfs(ni, nj)


result = 0
for i in range(H):
    for j in range(W):
        b, w = 0, 0
        dfs(i, j)
        result += b * w
print(result)



### FIXED CODE ###

from collections import deque


H, W = [int(_) for _ in input().split()]
S = [input() for _ in range(H)]


di = (1, 0, -1, 0)
dj = (0, 1, 0, -1)

def is_valid(i, j, d):
    ni = i + di[d]
    nj = j + dj[d]
    if not (0 <= ni < H and 0 <= nj < W):
        return False
    if S[i][j] == S[ni][nj]:
        return False
    return True


result = 0
visited = [[False] * W for _ in range(H)]
for i in range(H):
    for j in range(W):

        if visited[i][j]:
            continue
        visited[i][j] = True

        b = 0
        w = 0
        que = deque()
        que.append((i, j))
        while que:
            (ci, cj) = que.pop()
            if S[ci][cj] == '#':
                b += 1
            else:
                w += 1

            for d in range(4):
                if not is_valid(ci, cj, d):
                    continue
                ni = ci + di[d]
                nj = cj + dj[d]
                if visited[ni][nj]:
                    continue
                visited[ni][nj] = True
                que.append((ni, nj))

        result += b * w


print(result)
N=input()
def d(N):
    return "Yes" if "7" in N else "No"
print(d(n))

### FIXED CODE ###

N=input()
def d(N):
    return "Yes" if "7" in N else "No"
print(d(N))
import sys

nums = []


for line in sys.stdin:
    nums.append(line)

for i in range(len(nums)):
    input_line = nums[i].split(" ")
    a = long(input_line[0])
    b = long(input_line[1])


    #??¬?´???°?????????
    common_div = []

    #?????§??¬?´???°
    if a < b:
        last_num = a
    else:
        last_num = b

    for j in range(1,last_num-1):
        if a%j == 0 and b%j == 0:
            #a???b???j??§???????????¨???
            common_div.append(j)
    
    max_common_div = common_div[len(common_div)-1]
    min_common_mpl = long((a * b)/max_common_div)

    print(str(max_common_div) + " " + str(min_common_mpl))

    

### FIXED CODE ###

import sys
 
nums = []
 
 
for line in sys.stdin:
    nums.append(line)
 
for i in range(len(nums)):
    input_line = nums[i].split(" ")
    a = int(input_line[0])
    b = int(input_line[1])
 
    if a > b:
        num_bigger = a
        num_smaller = b
    else:
        num_bigger = b
        num_smaller = a

    r = 1   #?????????
    while r > 0:
        r = num_bigger % num_smaller
        num_bigger = num_smaller
        num_smaller = r

    max_common_div = num_bigger
    min_common_mpl = int((a * b)/max_common_div)
 
    print(str(max_common_div) + " " + str(min_common_mpl))
N = int(input())
A = sorted(list(map(int, input().split())))
print(A[N+1]-A[0])

### FIXED CODE ###

N = int(input())
A = sorted(list(map(int, input().split())))
print(A[N-1]-A[0])
x,y = map(int,input( ))
z = y-x
t = 0
for s in range(z+1):
    t += s
    
print(t-y)

### FIXED CODE ###

x = list(map(int,input().split( )))
z = x[1]-x[0]
t = 0
for s in range(z+1):
    t += s
    
print(t-x[1])
a,b,c = (int(i) for i in input().split())
print(sum(a,b,c)+max(a,b,c)*9)

### FIXED CODE ###

a,b,c = (int(i) for i in input().split())
print(a+b+c+max(a,b,c)*9)
n,x=map(int,input().split())

patty = [2**(i+1)-1 for i in range(n+1)][::-1]
length = [2**(i+2)-3 for i in range(n+1)][::-1]

ans=0
end=[0,1,2,3,3]

for i in range(n):
    hambergar=[1,1+length[i+1],2+length[i+1],2+2*length[i+1],3+2*length[i+1]]
    if i==n-1:
        ans+=end[x-1]
    else:
        if hambergar[0]<x and x<hambergar[2]:
            x-=1
        
        elif hambergar[2]<x and x<=hambergar[4]:
            ans+=patty[i+1]+1
            x-=hambergar[2]
        
        elif hambergar[2]==x:
            ans+=patty[i+1]+1
            break
        
        elif hambergar[4]<x or x<=1:
            break

print(ans)

### FIXED CODE ###

n,x=map(int,input().split())

patty = [2**(i+1)-1 for i in range(n+1)][::-1]
length = [2**(i+2)-3 for i in range(n+1)][::-1]

ans=0
end=[0,1,2,3,3]

for i in range(n):
    hambergar=[1,1+length[i+1],2+length[i+1],2+2*length[i+1],3+2*length[i+1]]
    if i==n-1:
        ans+=end[x-1]
    else:
        if hambergar[0]<x and x<hambergar[2]:
            x-=1
        
        elif hambergar[2]<x and x<hambergar[4]:
            ans+=patty[i+1]+1
            x-=hambergar[2]
        
        elif hambergar[2]==x:
            ans+=patty[i+1]+1
            break

        elif hambergar[4]==x:
            ans+=patty[i]
            break
        
        elif hambergar[4]<x or x<=1:
            break

print(ans)
n,t=map(int,input().split())
c=[list(map(int,input().split())) for i in range(n)]
d=list()
s1=0
s2=0
d=[[c[i][1]/c[i][0],c[i][0],c[i][1]] for i in range(n)]
d=sort(d,key=lambda x:(x[0],x[1]))
for i in range(n):
  s2+=d[i][2]
  s1+=d[i][1]
  if s1>=t-0.5:
    print(s2)
    exit()


### FIXED CODE ###

n,t=map(int,input().split())
l=[list(map(int,input().split())) for i in range(n)]
l.sort()
dp=[[0]*(t+1) for i in range(n+1)]
for i in range(1,n+1):
  for j in range(t+1):
    if j!=t:
      if j-l[i-1][0]>=0:
        dp[i][j]=max(dp[i-1][j],dp[i-1][j-l[i-1][0]]+l[i-1][1])
    else:
      dp[i][j]=max(dp[i-1][j],dp[i-1][j-1]+l[i-1][1])
    dp[i][j]=max(dp[i-1][j],dp[i][j])
print(max(dp[n]))
import sys
import math
import heapq
mod=10**9+7
inf=float("inf")
from math import sqrt
from collections import deque
from collections import Counter
from collections import defaultdict
#すべてのkeyが用意されてる defaultdict(int)で初期化
from collections import OrderedDict
#順序を保ったdict
from math import ceil
input=lambda: sys.stdin.readline().strip()
sys.setrecursionlimit(11451419)
from decimal import Decimal #floatの高精度ver, 渡すのはstr型で
from functools import lru_cache
#メモ化再帰defの冒頭に毎回 @lru_cache(maxsize=10**10)
#引数にlistはだめ
#######ここまでテンプレ#######
#ソート、"a"+"b"、再帰ならPython3の方がいい
#######ここから天ぷら########
k=int(input())
print(50)
if k==0:
    print(" ".join(["0"]*50));exit()
    
kijun=int((k-0.1)//50)+1
A=[50+kijun-1]*50
nokori=kijun*50-k
if nokori:
    print(" ".join([f"{i+1}"]*(50-nokori)+["0"]*nokori))
    exit()
print(*A)

### FIXED CODE ###

import sys
import math
import heapq
mod=10**9+7
inf=float("inf")
from math import sqrt
from collections import deque
from collections import Counter
from collections import defaultdict
#すべてのkeyが用意されてる defaultdict(int)で初期化
from collections import OrderedDict
#順序を保ったdict
from math import ceil
input=lambda: sys.stdin.readline().strip()
sys.setrecursionlimit(11451419)
from decimal import Decimal #floatの高精度ver, 渡すのはstr型で
from functools import lru_cache
#メモ化再帰defの冒頭に毎回 @lru_cache(maxsize=10**10)
#引数にlistはだめ
#######ここまでテンプレ#######
#ソート、"a"+"b"、再帰ならPython3の方がいい
#######ここから天ぷら########
k=int(input())
print(50);n=50
if k==0:
    print(" ".join(["0"]*50));exit()
    
a=k//n
b=k%n
A=[a+i for i in range(50)]
for  i in range(b):
    A=[A[j]-1 if i!=j else A[j]+n for j in range(50)]
print(*A)
n = int(input())
a = list(map(int,input().split()))
l =[]
k = 0
for i in range(n):
  if a[i]>=a[i-1]:
    if not l[k]:
      l.append(1)
    else:
      l[k] += 1
  else:
    k += 1
print(max(l))
    

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
l = [0]
k = 0
for i in range(n-1):
  if a[i]>=a[i+1]:
    l[k] += 1   
  else:
    k += 1
    l.append(0)
print(max(l))
N =0 int(input())
for i in range(1, 10):
    if((i-1)*111<x and x<=i*111):
        print(i*111)

### FIXED CODE ###

N = int(input())
for i in range(1, 10):
    if((i-1)*111<N and N<=i*111):
        print(i*111)
n = int(input())
if(n <= 999):
    print('ABC' + n)
else:
    print('ABD' + n)

### FIXED CODE ###

n = int(input())
if(n <= 999):
    print('ABC')
else:
    print('ABD')
import sys

lines = sys.stdin.readlines()

num_a ,num_b, num_m = [int(v) for v in lines[0].split()]
# ----

a_list = [int(v) for v in lines[1].split()[:num_a+1]]
b_list = [int(v) for v in lines[2].split()[:num_b+1]]

# print(a_list)
# print(b_list)

result = max(a_list) + max(b_list)
# ignores = set()
for c in lines[3:num_m+3]:
    a_i, b_i, discount = map(int, c.split())
    try:
#         ignores.add((int(a_i), int(b_i)))    
        price = a_list[a_i-1] + b_list[b_i-1] - discount
        
        if price < result:
            result = price
    except IndexError:
        print('------')
        print(c)
        pass

res1 = [
    a_list[a_i-1]+b_list[b_i-1]-discount for a_i, b_i, discount in [map(int, l.split())  for l in lines[3:num_m+3]]]


res2 = [a+b for b in b_list
        for a in a_list]

print(min(min(res1), min(res2)))

### FIXED CODE ###

import sys

lines = sys.stdin.readlines()
 
text = lines[0]

import re
if re.match(r'^(hi)+$', text):
    print('Yes')
else:
    print('No')
s = [ input() for i in [0]*3]
current = 0
while len(s[current]) >= 0 :
  if len(s[ord(s[current][-1]) - 97]) == 0:
    print(s[current][-1].upper())
    break
  else:
    tmp = s[current][-1] # 末尾の値を保存
    s[current] = s[current][:-1] # 末尾を消去する
    current = ord(tmp) - 97
    # 末尾の値にcurrentを更新する



### FIXED CODE ###

#!/usr/bin/env python3
s = [input() for _ in range(3)]
pos = 0#a,b,c ordにして97からひく
idx = [0,0,0] #ABCそれぞれの現在のindex
for i in range(300):#大きめにとってもbreakするのでOK
	if idx[pos] == len(s[pos]):
		print(chr(65+pos))
		exit()
	idx[pos] += 1 #idxの更新
	pos = ord(s[pos][idx[pos] - 1]) - 97 # asciiの文字にして引く、更新する前のidx で次の文字列を判定して更新
	#print(pos)
print(S[0:3])

### FIXED CODE ###

S = input()
print(S[0:3])
import Sample Input
S = Sample Input
h = (S / 3600)
m = (S / 60)
s = (for S in range(0,60))
print('h, m, s')

### FIXED CODE ###

S = int(input())

s = S % 60
m = S // 60 % 60
h = S // 60 // 60

print("{0}:{1}:{2}".format(h,m,s))
# 動的計画法

n=int(input())
s=input()
dp=[[[False for k in range(1000)] for j in range(4)] for i in range(n+1)]

dp[0][0][0]=True

for i in range(n):
    for j in range(4):
        for k in range(1000):
            if dp[i][j][k]==False:continue
            dp[i+1][j][k]=True
            if j<=2:
                dp[i+1][j+1][k*10+int(s[i])]=True
cnt=0
for i in range(1000):
    if dp[n][3][i]==True:cnt+=1
print(cnt)

### FIXED CODE ###

m,d=map(int,input().split(" "))
mm,dd=map(int,input().split(" "))
if m==mm:print(0)
else:print(1)
n,m =map(int(),imput().split())
print((n-1)*(m-1))

### FIXED CODE ###

n,m =map(int,input().split())
print((n-1)*(m-1))
X = list(map(int,input().split()))
for i in range(X):
  if X[i] == 0:
    print(i+1)

### FIXED CODE ###

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

for i in range(len(X)):
  if X[i] == 0:
    print(i+1)
    break
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 998244353

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    rr = []

    while True:
        s = S()
        t = S()
        def f(s):
            return '.*'.join(['']+[c for c in s]+[''])
        if re.match(f(s[0::2]), t) or re.match(f(s[1::2]), t):
            rr.append('Yes')
        else:
            rr.append('No')

        break



    return '\n'.join(map(str, rr))


print(main())




### FIXED CODE ###

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 998244353

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    rr = []

    while True:
        s = S()
        t = S()
        l = len(t)
        def f(s):
            i = 0
            for c in s:
                while i < l and t[i] != c:
                    i += 1
                if i == l:
                    return False
                i += 1
            return True

        if f(s[0::2]) or f(s[1::2]):
            rr.append('Yes')
        else:
            rr.append('No')

        break



    return '\n'.join(map(str, rr))


print(main())
inp=input().split()
for k in range(N):
  x.append(int(inp[k]))
def rec(x,y):
  if len(x)==1:
    for k in range(len(y)):
      print(y[k])
    return y
  OK=False
  for i in range(len(x)-1,0,-1):
    if x[i]==i:
      del x[i]
      y.insert(0,i)
      rec(x,y)
      OK=True
      break
  if OK==False:
    print(-1)
    return -1
rec(x,[])  

### FIXED CODE ###

N=int(input())
x=[0]
inp=input().split()
for k in range(N):
  x.append(int(inp[k]))
y=[]
OK=True
for k in range(N):
  ok=False
  for i in range(len(x)-1,0,-1):
    if x[i]==i:
      y.insert(0,i)
      del x[i]
      ok=True
      break
  if ok==False:
    print(-1)
    OK=False
    break
if OK==True:
  for k in range(len(y)):
    print(y[k])
if S[2]==S[3]:
    if S[4]==S[5]:
        print("Yes")
    else:
        print("No")
else:
    print("No")


### FIXED CODE ###

s = input()
if s[2]==s[3]:
    if s[4]==s[5]:
        print("Yes")
    else:
        print("No")
else:
    print("No")
n=int(input())
s=input()
for i in range(n):
    print(max(len(set(s[:i])&set(s[i:]))))

### FIXED CODE ###

n=int(input())
s=input()
ans = []
for i in range(n):
    ans.append(len(set(s[:i])&set(s[i:])))
print(max(ans))
import sys

# import os
# path = os.getcwd()
# path = os.path.join(path,"input.txt")
# sys.stdin = open(path)

input = sys.stdin.readline
import numpy as np
N = int(input())
abc = np.zeros((N,3))
for i in range(N):
    abc[i] = list(map(int,input().split()))

dp = np.zeros((N,3))
for i in range(N):
    if i == 0:
        dp[i] = abc[i]
        continue
    dp_a,dp_b,dp_c = dp[i-1]
    dp[i] = abc[i] + [max(dp_b,dp_c),max(dp_a,dp_c),max(dp_a,dp_b)]
print(int(max(dp[N-1])))


### FIXED CODE ###

import sys

# import os
# path = os.getcwd()
# path = os.path.join(path,"input.txt")
# sys.stdin = open(path)

input = sys.stdin.readline
import numpy as np
N = int(input())
abc = np.zeros((N,3))
for i in range(N):
    abc[i] = list(map(int,input().split()))

dp = np.zeros((N,3))
for i in range(N):
    if i == 0:
        dp[i] = abc[i]
        continue
    dp_a,dp_b,dp_c = dp[i-1]
    dp[i] = abc[i] + [max(dp_b,dp_c),max(dp_a,dp_c),max(dp_a,dp_b)]
print(int(max(dp[N-1])))
import math
n=int(input())
l=math.floor(math.sqrt(n))

for i in range(l,1,-1):
    if n%i==0:
        a,b=i,n//i
        k=max(math.floor(math.log10(a))+1,math.floor(math.log10(b))+1)
        break
print(k)


### FIXED CODE ###

import math
n=int(input())
l=math.floor(math.sqrt(n))
k=math.floor(math.log10(n))+1
#print(k)
#print(math.log10(n))
for i in range(2,l+1):
    if n%i==0:
        a,b=i,n//i
        x=max(math.floor(math.log10(a))+1,math.floor(math.log10(b))+1)
        k=min(x,k)
print(k)
N, K = map(int,input().split())
count = 0
while True:
    a,b = map(int,input().split())
    count += b
    if count > K:
        print(a)
        exit()

### FIXED CODE ###

N, K = map(int,input().split())
li = []
count = 0
for i in range(N):
    a,b = map(int,input().split())
    li.append([a,b])
li.sort()
for j in range(N):
    count += li[j][1]
    if count >= K:
        print(li[j][0])
        break
n = input()
a = input().split()
a_int = [int(i) for i in asp]
arev_sum = 0
for i in a_int:
    arev_sum += 1/i
ans = 1/arev_sum
print(ans)

### FIXED CODE ###

n = input()
a = input().split(' ')
a_int = [int(i) for i in a]

arev_sum = 0
for i in a_int:
    arev_sum += 1/i
    
ans = 1/arev_sum
print(ans)