fun main() = abc167a()

@OptIn(ExperimentalStdlibApi::class)
fun abc167a() {
    val s = readLine()!!
    val t = readLine()!!

    val answer = if (s == t.dropLast(1)) "Yes" else "No"

    println(answer)
}
