process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = []
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});

reader.on('line', (line) => {
  lines.push(line);
});

reader.on('close', () => {
 var s = lines[0].split('');
 var t = lines[1].split('');
 var ans = 'Yes';
 
 for(i=0; i<s.length; i++){
   if(s[i] !== t[i]){
     ans = 'No';
   }
 }
    if(s.length + 1 !== t.length){
    ans='No';
  }


 console.log(ans);
});