fun main(args: Array<String>) {
  val input1 = readLine()!!
  val input2 = readLine()!!
  val result = if (input2.startsWith(input1) && input2.length == input1.length + 1) "Yes" else "No"
  println(result)
}
