a = eval(input())

b = eval(input())



ans = True



for i in range(len(a)):    

  if a[i] != b[i]:

    ans = False

    break



if ans:

  print("Yes")

else:

  print("No")

s = eval(input())

t = eval(input())



t = t[:-1]

if s == t:

  	print("Yes")

else:

  	print("No")
a = eval(input())
b = eval(input())
ans = True
for i in range(len(a)):
    if a[i] != b[i]:
        ans = False
        break
if ans:
    print("Yes")
else:
    print("No")

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

-a = eval(input()) -b = eval(input()) -ans = True -for i in range(len(a)): -    if a[i] != b[i]: -        ans = False -        break -if ans: +s = eval(input()) +t = eval(input()) +t = t[:-1] +if s == t: