s = eval(input())

t = input()[:-1]



if s == t:

  print("Yes")

else:

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

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

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

-s = eval(input()) -t = input()[:-1] -if s == t: +if eval(input()) == input()[:-1]: