import Control.Monad
import Data.List

isMatch org dest 
 | org == init dest && (length org) + 1 == length dest = "Yes"
 | otherwise = "No"

main :: IO ()
main = do
  org <-  getLine
  dest <-  getLine
  
  putStrLn $ isMatch org dest