def s0():return eval(input())

def s1():return input().split()

def s2(n):return [eval(input()) for x in range(n)]

def s3(n):return [[input().split()] for _ in range(n)]

def n0():return int(eval(input()))

def n1():return [int(x) for x in input().split()]

def n2(n):return [int(eval(input())) for _ in range(n)]

def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]



s=s0()

t=s0()

if s==t[:-1]:

    print("Yes")

else:

    print("No")


def s0():return input()

def s1():return input().split()

def s2(n):return [input() for x in range(n)]

def s3(n):return [[input().split()] for _ in range(n)]

def n0():return int(input())

def n1():return [int(x) for x in input().split()]

def n2(n):return [int(input()) for _ in range(n)]

def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]

def t3(n):return [tuple(int(x) for x in input().split()) for _ in range(n)]

def p0(b,yes,no): print(yes) if b else print(no)

# from collections import Counter,deque,defaultdict

# import itertools

# import math

# import networkx

# from bisect import bisect_left,bisect_right



s=s0()

t=s0()

p0(s==t[:-1],"Yes","No")

    

def s0():
    return eval(input())


def s1():
    return input().split()


def s2(n):
    return [eval(input()) for x in range(n)]


def s3(n):
    return [[input().split()] for _ in range(n)]


def n0():
    return int(eval(input()))


def n1():
    return [int(x) for x in input().split()]


def n2(n):
    return [int(eval(input())) for _ in range(n)]


def n3(n):
    return [[int(x) for x in input().split()] for _ in range(n)]


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

def s0():
    return input()


def s1():
    return input().split()


def s2(n):
    return [input() for x in range(n)]


def s3(n):
    return [[input().split()] for _ in range(n)]


def n0():
    return int(input())


def n1():
    return [int(x) for x in input().split()]


def n2(n):
    return [int(input()) for _ in range(n)]


def n3(n):
    return [[int(x) for x in input().split()] for _ in range(n)]


def t3(n):
    return [tuple(int(x) for x in input().split()) for _ in range(n)]


def p0(b, yes, no):
    print(yes) if b else print(no)


# from collections import Counter,deque,defaultdict
# import itertools
# import math
# import networkx
# from bisect import bisect_left,bisect_right
s = s0()
t = s0()
p0(s == t[:-1], "Yes", "No")

-    return eval(input()) +    return input() -    return [eval(input()) for x in range(n)] +    return [input() for x in range(n)] -    return int(eval(input())) +    return int(input()) -    return [int(eval(input())) for _ in range(n)] +    return [int(input()) for _ in range(n)] +def t3(n): +    return [tuple(int(x) for x in input().split()) for _ in range(n)] + + +def p0(b, yes, no): +    print(yes) if b else print(no) + + +# from collections import Counter,deque,defaultdict +# import itertools +# import math +# import networkx +# from bisect import bisect_left,bisect_right -if s == t[:-1]: -    print("Yes") -else: -    print("No") +p0(s == t[:-1], "Yes", "No")