S = input()
T = input()
for i, j in zip(S, T[:-1]):
    if i != j:
        print('No')
        break
else:
    print('Yes')

47cb7e6e69db4372d2b2687cfededc1a56dbd256
<mask token>

<mask token>
for i, j in zip(S, T[:-1]):
    if i != j:
        print('No')
        break
else:
    print('Yes')

S = input()
T = input()
for i, j in zip(S, T[:-1]):
    if i != j:
        print('No')
        break
else:
    print('Yes')
