import scala.io.StdIn.{readLine}_

object Main extends App {
  val s = readLine()
  val t = readLine()
  val ans = if (s == t.take(s.length) && t.length == s.length+1) "Yes" else "No"
  println(ans)
}
