import sys

S = eval(input())

T = eval(input())

if len(S) > len(T):

    print('No')

    sys.exit()

T = T[:-1]

if S == T:

    print('Yes')

else:

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

T = eval(input())

if S == T[:-1]:

    print('Yes')

else:

    print('No')
import sys

S = eval(input())
T = eval(input())
if len(S) > len(T):
    print("No")
    sys.exit()
T = T[:-1]
if S == T:
    print("Yes")
else:
    print("No")

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

-import sys - -if len(S) > len(T): -    print("No") -    sys.exit() -T = T[:-1] -if S == T: +if S == T[:-1]: