from collections import *



S = eval(input())

T = eval(input())



if S==T[:-1]:

    print('Yes')

else:

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

T = eval(input())



if S==T[:-1]:

    print('Yes')

else:

    print('No')
from collections import *

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

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

-from collections import * -