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

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