'use strict'

function main(input) {
  const inputList = input.split('\n');
  const s = inputList[0]
  const t = inputList[1]

  if (s.length+1 === t.length && s === t.slice(0, t.length-1)) {
    console.log('Yes')
  } else {
    console.log('No')
  }
}

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