Imports System

Public Class Test
	Public Shared Sub Main()
        Dim up As String
        Dim down As String
        Dim a11, a12, a13, a21, a22, a23 As String
        up = Console.ReadLine()
        down = Console.ReadLine()
        a11 = up.Substring(0, 1)
        a12 = up.Substring(1, 1)
        a13 = up.Substring(2, 1)
        a21 = down.Substring(0, 1)
        a22 = down.Substring(1, 1)
        a23 = down.Substring(2, 1)
        If (a11 = a23 AndAlso a12 = a22 AndAlso a13 = a21) Then
      		Console.WriteLine("YES")
        Else
            Console.WriteLine("NO")
        End If
	End Sub
End Class