import re



s = eval(input())

t = eval(input())



if len(t) >= len(s) + 1 and re.match(s,t):

    print('Yes')

else:

    print('No')
s = eval(input())

t = input()[:-1]



if s == t:

    print('Yes')

else:

    print('No')
import re

s = eval(input())
t = eval(input())
if len(t) >= len(s) + 1 and re.match(s, t):
    print("Yes")
else:
    print("No")

s = eval(input())
t = input()[:-1]
if s == t:
    print("Yes")
else:
    print("No")

-import re - -t = eval(input()) -if len(t) >= len(s) + 1 and re.match(s, t): +t = input()[:-1] +if s == t: