import Foundation
var str: String = readLine()!
var str2: String = readLine()!
if str2.count == str.count+1{
    if str2.prefix(str.count) == str {
        print("Yes")
        }else{
            print("No")

        }
}else{
    print("No")

}