let registration s1 s2 =
  if s1 = String.sub s2 0 ((String.length s2) -1) then "Yes"
                                                  else "No"
let s1 = read_line()
let s2 = read_line()
let ans = registration s1 s2
let () = print_endline ans