import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

sys.setrecursionlimit(10 ** 7)



s = readline().rstrip().decode()

t = readline().rstrip().decode()

if s == t[:len(t) - 1]:

    print('Yes')

else:

    print('No')

import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

sys.setrecursionlimit(10 ** 7)



s = readline().rstrip().decode()

t = read().rstrip().decode()

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

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**7)
s = readline().rstrip().decode()
t = readline().rstrip().decode()
if s == t[: len(t) - 1]:
    print("Yes")
else:
    print("No")

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**7)
s = readline().rstrip().decode()
t = read().rstrip().decode()
print(("Yes" if s == t[:-1] else "No"))

-t = readline().rstrip().decode() -if s == t[: len(t) - 1]: -    print("Yes") -else: -    print("No") +t = read().rstrip().decode() +print(("Yes" if s == t[:-1] else "No"))