#!/usr/bin/env python3

# Generated by https://github.com/kyuridenamida/atcoder-tools

from typing import *

import itertools

import math

import sys



INF = float('inf')

YES = "Yes"  # type: str

NO = "No"  # type: str





def solve(S: str, T: str):

    return [NO, YES][len(S)+1 == len(T) and S == T[:-1]]





def main():



    sys.setrecursionlimit(10 ** 6)



    def iterate_tokens():

        for line in sys.stdin:

            for word in line.split():

                yield word

    tokens = iterate_tokens()

    S = next(tokens)  # type: str

    T = next(tokens)  # type: str

    print((solve(S, T)))





if __name__ == '__main__':

    main()

#!/usr/bin/env python3

# Generated by https://github.com/kyuridenamida/atcoder-tools

from typing import *

import itertools

import math

import sys



INF = float('inf')

YES = "Yes"  # type: str

NO = "No"  # type: str





def solve(S: str, T: str):

    return [NO, YES][S == T[:-1]]





def main():



    sys.setrecursionlimit(10 ** 6)



    def iterate_tokens():

        for line in sys.stdin:

            for word in line.split():

                yield word

    tokens = iterate_tokens()

    S = next(tokens)  # type: str

    T = next(tokens)  # type: str

    print((solve(S, T)))





if __name__ == '__main__':

    main()

#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import itertools
import math
import sys

INF = float("inf")
YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(S: str, T: str):
    return [NO, YES][len(S) + 1 == len(T) and S == T[:-1]]


def main():
    sys.setrecursionlimit(10**6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    T = next(tokens)  # type: str
    print((solve(S, T)))


if __name__ == "__main__":
    main()

#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import itertools
import math
import sys

INF = float("inf")
YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(S: str, T: str):
    return [NO, YES][S == T[:-1]]


def main():
    sys.setrecursionlimit(10**6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    T = next(tokens)  # type: str
    print((solve(S, T)))


if __name__ == "__main__":
    main()

-    return [NO, YES][len(S) + 1 == len(T) and S == T[:-1]] +    return [NO, YES][S == T[:-1]]