def solve():

    s = eval(input())

    t = eval(input())

    if s == t[:-1]:

        print('Yes')

    else:

        print('No')





if __name__ == '__main__':

    solve()

s = eval(input())

t = eval(input())

if s == t[:-1]:

    print('Yes')

else:

    print('No')

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


if __name__ == "__main__":
    solve()

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

-def solve(): -    s = eval(input()) -    t = eval(input()) -    if s == t[:-1]: -        print("Yes") -    else: -        print("No") - - -if __name__ == "__main__": -    solve() +s = eval(input()) +t = eval(input()) +if s == t[:-1]: +    print("Yes") +else: +    print("No")