function main(input) {
  const args = input.split('\n');
  const S = args[0];
  const T = args[1];
  console.log(T.slice(0, -1) === S ? 'Yes' : 'No');
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
