program main
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32):: i
    character(3):: c1,c2

    read*, c1
    read*, c2

    do i=1,3
        if (c1(i:i) /= c2(4-i:4-i)) then
            print'(a)', 'NO'
            stop
        end if
    end do
    print'(a)', 'YES'
end program main