let string_rev s =
  let len = String.length s in
  String.init len (fun i -> s.[len - 1 - i]);;
let str_eq s1 s2 = s1=s2;;
let f s1 s2 = if s1=(string_rev s2) then "YES" else "NO";;
let () = Scanf.scanf "%s %s" f |> Printf.printf "%s\n"