open Printf
open Scanf

let solve s t =
  let l = String.length s in
  let rec loop i =
    if i = l then "Yes"
    else if s.[i] = t.[i] then loop (i + 1)
    else "No"
  in loop 0

let () =
  scanf "%s %s " solve |> printf "%s\n"
