S = eval(input())

T = eval(input())



lens = len(S)

lent = len(T)



ans = True

if lens + 1 != lent:

    ans = False



for i in range(lens):

    if S[i] != T[i]:

        ans = False



if ans:

    print('Yes')

else:

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

T = eval(input())



if S == T[:-1]:

    print('Yes')

else:

    print('No')
S = eval(input())
T = eval(input())
lens = len(S)
lent = len(T)
ans = True
if lens + 1 != lent:
    ans = False
for i in range(lens):
    if S[i] != T[i]:
        ans = False
if ans:
    print("Yes")
else:
    print("No")

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

-lens = len(S) -lent = len(T) -ans = True -if lens + 1 != lent: -    ans = False -for i in range(lens): -    if S[i] != T[i]: -        ans = False -if ans: +if S == T[:-1]: