program ABC_077_A_Rotation
   implicit none
   integer i, countN
   character(3) c1, c2
   read(*, *) c1, c2
   countN = 0
   do i = 1, 3
       if(c1(i:i) == c2(4-i:4-i)) then
	       countN = countN + 1
	   end if
   end do
   if(countN == 3) then
       write(*, *) 'YES'
   else
       write(*, *) 'NO'
   end if
end program ABC_077_A_Rotation