let a = Scanf.scanf "%s %s %s" @@ fun a b c -> Array.of_list [a; b; c]
let b = Scanf.scanf "%s %s %s" @@ fun a b c -> Array.of_list [a; b; c]
let ans = if a.(0) = b.(2) && a.(1) = b.(1) && a.(2) = b.(0) then "YES" else "NO"
let () = print_endline ans