program ABC077A
    implicit none
    character(3)::C1,C2
    read(5,*)C1,C2

    if(C1(1:1)==C2(3:3) .and. C1(2:2)==C2(2:2) .and. C1(3:3)==C2(1:1))then
        print'(A)',"YES"
    else
        print'(A)',"NO"
    end if
    
end program ABC077A