s = eval(input())

t = eval(input())

print(('Yes' if s == t[:-1] else 'No'))

s = eval(input())

t = input()[:-1]

print(('Yes' if s == t else 'No'))

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

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

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