import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Text.Read as T

main :: IO ()
main = do
  s <- T.getLine :: IO T.Text
  t <- T.getLine :: IO T.Text
  putStrLn $ if s `T.isPrefixOf` t && T.length s == T.length t - 1 then "Yes" else "No"
