fun main(){

    val str1 = readLine()!!
    val str2 = readLine()!!

    val str2Delete = str2.dropLast(1)

    if (str1 == str2Delete){
        print("Yes")
    }
    else{
        print("No")
    }
}