import scala.io.Source

object Main extends App {
  val inputStrings = Source.stdin.getLines().toList
  val List(s, t) = inputStrings.take(2)
  val result = if (s == t.take(s.length) && t.length == s.length + 1)
    "Yes"
  else
	"No"
  println(result)
}
