open Batteries
let arr = String.explode (read_line ())
let brr = List.rev (String.explode (read_line ()))
let ans = List.fold_left2 (fun a b c -> if b = c then a && true else a && false) true arr brr
let () = print_endline (if ans then "YES" else "NO")