s = eval(input())

t = eval(input())

num = len(t)

if s == t[:num-1]:

    print("Yes")

else:

    print("No")
s =  list(eval(input()))

t = list(eval(input()))



if s == t[:-1]:

    print("Yes")

else:

    print("No")

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

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

-s = eval(input()) -t = eval(input()) -num = len(t) -if s == t[: num - 1]: +s = list(eval(input())) +t = list(eval(input())) +if s == t[:-1]: