const processData = (lines) => {
  const s = lines[0]
  const t = lines[1]

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

let i = ''
process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
  const {EOL} = require('os')
  const lines = i.split(EOL) /*your input text, split by lines*/
  processData(lines)
})
