object Main {
  def main(args: Array[String]): Unit = {
    import scala.io.StdIn.readLine
    val Array(datS) = readLine.split(" ")
    val Array(datT) = readLine.split(" ")

    val ans1 = (datS.length + 1 == datT.length)
    val ans2 = (datS == datT.substring(0, datS.length))
    val ans = ans1 && ans2
    println(if(ans) "Yes" else "No")
  }
}
