import io.StdIn._
 
object Main extends App {
  val regex = "[0-9a-zA-Z]+".r
  (readLine, readLine) match {
    case (l1, l2)
        if 1 <= l1.length && l1.length <= 10 && regex.matches(l1) && l2.startsWith(l1) && l1.length + 1 == l2.length =>
      println("Yes")
    case _ => println("No")
  }
}