let () = 
  let s = read_line () in
  let t = read_line () in
  print_endline @@
    if
      List.for_all (fun i -> s.[i] = t.[i]) @@
      List.init (String.length s) Fun.id
    then "Yes"
    else "No"