Imports System

Module Program
    Sub Main(args As String())
        Dim S As String = Console.ReadLine()
        Dim T As String = Console.ReadLine()

        Dim ans As String = ""
        If S = Left(T, Len(S)) Then
            ans = "Yes"
        Else
            ans = "No"
        End If

        Console.WriteLine(ans)

    End Sub
End Module
