function Main(input){
    input=input.split("\n");  //ここまで必須
    var yori=input[0].length;

    if (input[0]==input[1].slice(0,yori)){console.log("Yes")}else{console.log("No")}
}
Main(require("fs").readFileSync("/dev/stdin","utf8"));
