let readString() = stdin.ReadLine()
let readStringArray() = stdin.ReadLine().Split(' ');
let readInt() = readString() |> int
let readIntArray() = readStringArray() |> Array.map (fun x -> int x)
let char2String(value) = List.ofSeq value |> List.toArray |> System.String


let c1 = readString()
let c2 = readString()

if c1 = char2String(Seq.rev c2) then "YES" else "NO"
|> printfn "%s"