open Batteries
(* 文字列をcharのlistにする *)
let explode s = List.init (String.length s) (String.get s)
let s = read_line() |> explode
let t = read_line() |> explode
let t2 = List.init (List.length s) @@ fun a -> List.nth s a
let _ = (if s = t2 then "Yes" else "No") |> print_endline