prev = eval(input())

new = eval(input())

flag = 0

if len(prev)+1 == len(new):

  for i in range(len(prev)):

    if prev[i] == new[i]:

      flag += 1

if flag == len(prev):

  print('Yes')

else:

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

t = input()[:-1]



if s == t:

    print("Yes")

else:

    print("No")
prev = eval(input())
new = eval(input())
flag = 0
if len(prev) + 1 == len(new):
    for i in range(len(prev)):
        if prev[i] == new[i]:
            flag += 1
if flag == len(prev):
    print("Yes")
else:
    print("No")

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

-prev = eval(input()) -new = eval(input()) -flag = 0 -if len(prev) + 1 == len(new): -    for i in range(len(prev)): -        if prev[i] == new[i]: -            flag += 1 -if flag == len(prev): +s = eval(input()) +t = input()[:-1] +if s == t: