let () =
  let c1s = read_line () in
  let c2s = read_line () in
  Array.init 3 (fun i -> c1s.[i] = c2s.[2 - i])
  |> Array.fold_left ( && ) true
  |> (function true -> "YES" | false -> "NO")
  |> print_endline