fun main() {
    val s = readLine()!!
    val t = readLine()!!

    var sDash = t.substring(0,t.length - 1)

    val result = if(s == sDash){
        "Yes"
    }else{
        "No"
    }

    println(result)
}