fun main(args: Array<String>) {
	val s = readLine()!!.toString()
  	val t = readLine()!!.toString()
  
  	if (s.length + 1 == t.length) {
    	val sSubstring = s.substring(0, s.length)
  		val tSubstring = t.substring(0, s.length)
      	if (sSubstring == tSubstring) {
        	 println("Yes")
        } else {
        	println("No") 
        }
    } else {
    	println("No") 
    }
}