Imports System.Collections.Generic
Imports System.Console

Module Program
    Sub Main()
      Dim S As String = Console.ReadLine()
      Dim T As String = Console.ReadLine()

      Dim Ans As String = "YES" 
      For c As Integer = 0 To 2
          If Not S.Substring(c,1)=T.Substring(2-c,1) Then
              Ans = "NO"
          End If
      Next c
      Console.WriteLine(Ans)
    End Sub
End Module
