defmodule Main do
	def main do
    	hoge = IO.gets("") |> String.trim()
        {:ok, s} = hoge <> ".$" |> Regex.compile()
		t = IO.gets("") |> String.trim()

		if String.match?(t, s) do
			IO.puts("Yes")
		else
			IO.puts("No")
		end
    end
end
