module Amondai
  sub main
    Dim S As string = console.readline()
    Dim T As string = Console.ReadLine()
    if S = T.Substring(0,T.Length-1) then
      Console.WriteLine("Yes")
    else
      Console.WriteLine("No")
  	end if
  end sub
end module