
function Main(input) {
    input = input.trim();    
    input = input.split("\n")

    var a = input[0]
    var b = input[1]

    b = b.slice(0,b.length-1)

    if(a == b){
        console.log("Yes");
    }else{
        console.log("No")
    }    

}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
