// AtCoder My Practice
// author: Leonardone @ NEETSDKASU

[<EntryPoint>]
let main _ =
    let a = stdin.ReadLine()
    let b = stdin.ReadLine()
    let f1 = a.[0] = b.[2]
    let f2 = a.[1] = b.[1]
    let f3 = a.[2] = b.[0]
    let ans = if f1 && f2 && f3 then "YES" else "NO"
    printfn "%s" ans
    0