import sys



S = eval(input())

T = eval(input())



if S == T[:-1]:

    print("Yes")

else:

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

T = eval(input())

 

if len(S) + 1 == len(T) and S == T[:-1] and 1 <= len(S) <= 10 and T.islower() == True and S.islower() == True:

    print("Yes")

else:

    print("No")
import sys

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

S = eval(input())
T = eval(input())
if (
    len(S) + 1 == len(T)
    and S == T[:-1]
    and 1 <= len(S) <= 10
    and T.islower() == True
    and S.islower() == True
):
    print("Yes")
else:
    print("No")

-import sys - -if S == T[:-1]: +if ( +    len(S) + 1 == len(T) +    and S == T[:-1] +    and 1 <= len(S) <= 10 +    and T.islower() == True +    and S.islower() == True +):