import Foundation
var str: String = readLine()!
var str2: String = readLine()!

if str2.contains(str){
    if str2.count == str.count+1{
    print("Yes")
    }else{
        print("No")

    }
}else{
    print("No")
}