import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val a = sc.next()
    val b = sc.next()
    if (a.length == b.length - 1 && b.startsWith(a)) {
        println("Yes")
    } else {
        println("No")
    }
}