The translation from the Berland language into the Birland language is not an easy task. Those languages are very similar: a berlandish word differs from a birlandish word with the same meaning a little: it is spelled (and pronounced) reversely. For example, a Berlandish word code corresponds to a Birlandish word edoc. However, it's easy to make a mistake during the «translation». Vasya translated word *s* from Berlandish into Birlandish as *t*. Help him: find out if he translated the word correctly.
The first line contains word *s*, the second line contains word *t*. The words consist of lowercase Latin letters. The input data do not consist unnecessary spaces. The words are not empty and their lengths do not exceed 100 symbols.
# t=int(input())
# for i in range(t):
#     n=int(input())
#     (ma=listap(int,input().split()))
#     w=a[0]
#     if(w==0):
#         print(0)
#     else:
#         d=w
#         for i in range(1,n):
#             d -=1
#             d+=a[i]
#             w+=a[i]
#             if(d==0):
#                 break
#         print(t) 
   
# t=int(input())
# for i in range(t):
#     x,y,n=map(int,input().split())
#     count=0
#     for i in range(n+1):
#         if((x^i)<(y^i)):
#             count+=1
#     print(count)  
# w=int(input())
# flag=0
# for i in range(1,w):
#     if((w-i)%2==0 and i%2==0):
#         flag=1
#         break
# if(flag==1):
#     print("YES")
# else:
# #     print("NO")    
# w=int(input())
# if(w>2 and w%2==0):
#     print("YES")
# else:
#     print("NO") 
# n=int(input())
# d={}
# b=set()
# for i in range(n):
#     c=input()
#     if c not in b:
#         d[c]=1
#         b.add(c)
#         print("OK")
#     else:
#         print(c+str(d[c]))
#         d[c]+=1  
# def factorial(N):
#     if(N==0 or N==1):
#         return 1
#     return(N*factorial(N-1))
# N=int(input())
# print(factorial(N)) 
# def dist(s): for finding the year which has no repeated element
#     s=str(s)
#     for i in range(len(s)):
#         for j in range(i + 1,len(s)): 
#             if(s[i] == s[j]):
#                 return False
#     return True
# n=int(input())

# while(True):
#     n=n+1
#     if(dist(n)==True):
#         print(n)
#         break
# t=int(input())
# for i in range(t):
#     n,k=map(int,input().split())
#     a=list(map(int,input().split()))
#     d=max(a)+k
#     c=min(a)-k
#     e=d-c
#     print(e) 
# n=int(input())
# for i in range(n):
#     n=input()
#     a=n[0]
#     b=n[-1]
#     c=len(n)
#     f=(c-2)
#     e=a+str(f)+b 
#     if(c>10):
#         print(e)
#     else:
#         print(n)
# n=int(input())
# c=0
# for i in range(n):
#     a=list(map(int,input().split()))
#     d=sum(a)
#     if(d>=2):
#         c+=1
# print(c)
# n,k=map(int,input().split())
# a=list(map(int,input().split()))
# b=0
# for i in range(len(a)):
    
#     if(a[i]==0):
#         # print(0)
#         b = b
#     elif(a[i]>=a[k-1]):
#         b+=1
#     # d=len(b) 
# print(b) 
# t=int(input())
# for i in range(t):
#     n=input()
#     c=len(n)  
#     print(c)
# t=int(input())
# for i in range(t):
#     x,y=map(int,input().split())
#     if(x==y):
#         x-=1
#         print(x,y)
#     elif(x>y):
#         x=x-1
#         y=y
#         print(x,y)
#     else:
#         y=y
#         x=x-1
#         print(x,y)
# m,n=map(int,input().split())
# d=m*n//2
# print(d)
# k,n,w=map(int,input().split())
# d=0
# for i in range(1,w+1):
#     d+=(k*i)
# e=d-n
# if(e>0):
#     print(e)
# else:
#     print(0)
# x=int(input())
# d=x//5
# e=x%5   
# if(e==0):
#     print(d)
# else:
#     print(d+1)
# t=int(input())
# x=0
# for i in range(t):
#     a=input()
#     m="++X"
#     o="X++"
#     n="--X"
#     p="X--"
#     if(m in a or o in a):
#         x+=1
#     else:
#         x-=1
# # print(x)
# import math
# n=int(input())
# sum=0
# for i in range(1,n+1):
#     sum=sum+(pow(-1,i)*i)
# print(math.floor(sum)) 
# t=int(input())
# for i in range(t):
#     a,b=map(int,input().split())
#     e=(a//2)*(b//2)
#     o=(a-(a//2))*(b-(b//2))
#     print(e+o) 
# for _ in range(int(input())):
    # n,m=map(int,input().split())
    # a=set(list(map(int,input().split())))

# import math
# t=int(input())
# for i in range(t):
#     n,d=map(int,input().split())
#     a=list(map(int,input().split()))
#     risk_count=0
#     for i in range(n):
#         if(a[i]>=80 or a[i]<=9):
#             risk_count+=1
            
#     print(math.ceil(risk_count/d)+math.ceil((n-risk_count)/d))
#     # d=len(a)-count 
# n=int(input())
# for i in range(n):
#     a=list(map(int,input().split()))
#     c=sum(a)/n
#     print(format(c,".12f"))
# d1,v1,d2,v2,p=map(int,input().split())
# a=0
# c=0
# if(d1==d2 and d1==1):
#     while(a<p):
#         c+=1
#         a+=(v1+v2)
#     print(c)
# else:
#     c=(min(d1,d2)-1)
#     while(a<p):
#         if(d1>d2):
#             a+=v2
#             d2+=1
#         elif(d2>d1):
#             a+=v1
#             d1+=1
#         elif(d1==d2):
#             a+=(v1+v2)
#         c+=1
#     print(c)
# t=int(input())
# for i in range(t):
#     n,k=map(int,input().split())
#     a=[]
#     for i in range(1,n+1):
#         a.append(i)
#     if(n%2==0):
#         for i in range(n):
#             if(i%2==0):
#                 a[i]=-a[i]
#             else:
#                  a[i]=+a[i]
#     else:
#         for i in range(n):
#             if(i%2==0):
#                 a[i]=+a[i]
#             else:
#                 a[i]=-a[i]
#     print(a)
#     sum=0
#     cnt=0
#     for i in range(n):
#         sum+=a[i]
#         if(sum>0):
#             cnt+=1
#     print(cnt)
#     if(cnt>k):
#         for i in range(n,-1,-2):
#             if(a[i]<0):
#                 a[i]=-a[i]
#             else:
#                 a[i]=-a[i]    
#         cnt-=1
#         # print(a)
#     elif(cnt<k):
#         for i in range(n):
#             if(a[i]>0):
#                 a[i]=-a[i]
#             else:
#                 a[i]=-a[i]
#         cnt+=1
#     elif(cnt==k):
#         break    
# print(a) 
# a=input()
# b=input()
# def solve(a,b):
#     a=a.lower()
#     b=b.lower()
#     c=0
#     for i in range(len(a)):
#         if(a[i]>b[i]):
#             return 1
#         elif(a[i]<b[i]):
#             return -1
#         else:
#             c+=1
#     if(c==len(a)):
#         return 0
# print(solve(a,b))
# n=int(input())
# a=list(map(int,input().split()))
# sum=0
# for i in range(n):
#     sum=sum+a[i]
# c=sum/n
# print(c)
# a=int(input())
# if(a%2==0):
#     d=a//2
#     print(d)
# else:
#     e=-((a//2)+1)
#     print(e)
# for _ in range(int(input())):
#     n=int(input())
#     a=input()
#     x="trygub"
#     b=set(x)
#     arr=[0]*256
#     i=0
#     while(a and i<len(a)):
#         if a[i] in b:
#             arr[ord(a[i])]+=1
#             a=a[:i]+a[i+1:]
#         else:
#             i+=1
    
#     y="bugryt"
#     for i in y:
#         a+=i*arr[ord(i)]
#     print(a)
# n=input()
# a=list(n.split('+'))
# # print(a)
# a.sort()
# # print(a)
# print("+".join(a))
# n=input()
# a=n[0]
# a=a.capitalize()
# b=n[1:]
# # print(b)
# c=a+b
# print(c)
# A=list(map(int,input().split()))
# N=len(A)
# def leaders(A,N):
#     for i in range(N):
#         flag=0
#         j=i+1
#         for j in range(N):
#             if(A[i]<=A[j]):
#                 flag=1
#                 break
#         if(flag==0):
#             print(A[i])
# print(leaders(A,N)) 
# a=input()
# b=set(a)
# # print(b)
# if(len(b)%2==0):
#     print("CHAT WITH HER!")
# else:
#     print("IGNORE HIM!") 
# n=int(input())
# s=input()
# c=0
# for i in range(1,n):
#     if(s[i]==s[i-1]):
#         c+=1
# print(c)
# def kthSmallest(A, n, k):  
#     A.sort()  
#     return A[k-1] 
# A=list(map(int,input().split()))
# n = len(A) 
# k = int(input())
# print("K'th smallest element is",kthSmallest(A, n, k))
# a=[4,3,1,2]
# d=3
# b=list(a) 
# c=a[d:]+a[:d]
# print(c)
# t=int(input())
# for i in range(t):
#     n=int(input())
#     a=list(map(int,input().split()))
    # arr=[]
    # low=0
    # high=n-1
    # while(low<=high):
    #     arr.append(a[low])
    #     arr.append(a[high])
    #     low=low+1
    #     high=high-1
    # print(*arr[:n]) 
# t=int(input())
# for i in range(t):
#     n=int(input())
#     a=input()
#     if (a[0]=='2'and a[-3:]=='020')or(a[:2]=='20' and a[-2:]=='20'):
#         print("YES")
#     elif (a[:3]=='202' and a[-1]=='0')or a[:4]=='2020'or a[-4:]=='2020':
#         print("YES")
#     else:
#         print("NO")    
            # if(s==2020):
    #     print("YES")
    # elif(s.count(2)>2 and s.count(0)>2):
    #     print("YES")
    # else:
    #     print("NO")
# temparray=[1,2,3,4,5,6,7,8,9,19,29,39,49,59,69,79,89,189,289,389,489,589,689,789,1789,2789,3789,4789,5789,6789,16789,26789,36789,46789,56789,156789,256789,356789,456789,1456789,2456789,3456789,13456789,23456789,123456789,-1,-1,-1,-1,-1,-1]
# t=int(input())
# for i in range(t):
#     n=int(input())
#     c=temparray[n-1]
#     print(c)
##########-----majority element
  
  
# def majorityElement(A,N):
#     m = -1
#     i = 0
#     for j in range(N):
#         if i == 0:
#             m = A[j]
#             i = 1
#         elif m == A[j]:
#             i = i + 1
#         else:
#             i = i - 1
#     return m
# def majorityElement(A,N):
#     for i in range(N):
#         count = 1
#         for j in range(N):
#             if (A[j] == A[i]):
#                 count+=1
#         if (count > N//2):
#             return A[i]
#     return -1 
# N=int(input())
# A=list(map(int,input().split()))     
# print(majorityElement(A,N))

# from collections import Counter
# def majorityElement(a,n):
#     x=Counter(a)
#     return x
# print(majorityElement([2,3,4,2,1,3],2))
    


# import itertools
# t=int(input()) 
# for _ in range(t):
#     n=int(input())
#     a=input()
#     b=input()
#     if a==b:
#         print("EQUAL")
#     else:
#         x=(list(itertools.permutations(a,n)))
#         y=(list(itertools.permutations(b,n)))
#         cx=cy=0
#         # print(len(xx))
#         for i in range(len(x)):
#             if x[i]>y[i]:
#                 cx+=1
#             else:
#                 cy+=1
#         # print(cx,cy)
#         if cx>cy:
#             print("RED")
#         elif(cx<cy):
#             print("BLUE")
#         else:
#             print("EQUAL")
# t=int(input())
# for i in range(t):
#     n=int(input())
#     w=input()
#     a=0
#     for i in range(n-1,-1,-1):
#         if(w[i]!=')'):
#             break
#         a+=1
#     if(a>(n-a)):
#         print("YES")
#     else:
#          print("NO")
# t=int(input())
# for i in range(t):
#     n=int(input())
#     while(True):
#         a=str(n)
#         a=set(a)
#         l=len(a)
#         c=0
#         for i in a:
#             if(i!='0' and n%int(i)!=0):
#                 break
#             c+=1
#         if(c==l):
#             print(n)
#             break
#         n+=1
# t=int(input())
# for i in range(t):
#     n=input()
#     a=n.count("(")
#     b=n.count(")")
#     d=n.count("?")
#     if(a==b and d==0):
#         print("YES")
#     elif(n[0]==")"):
#         print("NO")
#     elif((a+b)==d):
#         print("yes")
#     else:
#         print("NO")   
# s= input()
# upper=0
# lower=0
# for i in range(len(s)):
#       #to lower case letter
#       if(s[i]>='a' and s[i]<='z'):
#           lower+=1
#       #to upper case letter
#       elif(s[i]>='A' and s[i]<='Z'):
#           upper+=1
# if(lower>upper or lower==upper):
#     s=s.lower()
# elif(lower<upper):
#     s=s.upper()
# else:
#     s.lower
# print(s)
# t=int(input()) 
# for i in range(t):
#     n=int(input())
#     if(n==1 or n==2):
#         print(0)
#     else:
#         d=((n-1)//2)
#         print(d)
# t=int(input())
# for i in range(t):
# a,b=map(int,input().split())
# if(a>b):
#     print(b, abs((a-b))//2)
# else:
#     print(a, abs((a-b))//2)
# def reverse_ankit(num):
#     sum=0
#     s=1
#     if num<0:
#         s=-1
#         num=num*-1
#     while num>0:
#         d=num%10
#         sum=sum*10+d
#         num=num//10
#     if not -2147483648<sum<2147483647:
#         return 0
#     return s*sum
# print(reverse_ankit(-123)) 
# FOR TAKING MATRIX DIRECTLY

# A= []

# x = y = 0

# for i in range(5):

#     matrix = input().split()

#     A.append(matrix)

#     for j in range(0, 5):

#         if(A[i][j] == "1"):

#             x = i-2

#             y = j-2

# print(abs(x) + abs(y))
# a,b=map(int,input().split())
# c=0
# while(True):
#     c=c+1
#     a=a*3
#     b=b*2
#     if( a>b):
#         print(c)
#         break
# n,k=map(int,input().split())
# for i in range(k):
#     if(n%10==0):
#         n=n//10
#     else:
#         n=n-1
# print(n)
# def sum(a,b):
#     while b!=0:
#         carry=a&b
#         a=a^b
#         b=carry<<1
#     return a
# print(sum(5,3))
#  def findPairs(self, arr, n):
#         a=arr[0]
#         l=arr[n-1]
        # arr1=arr[0,n-1]
        # print(arr1)
        # sum=0
        # for i+1 in arr:
        #     a=a+i
        # for i in arr[0,n-1]:
# arr=[1,2,3,4,5,6]
# n=6
# a=arr[0]
# l=arr[n-1]
# arr1=arr[1:n]
# arr2=arr[0:n-1]
# arr3=[]
# arr4=[]

# for j in arr1:
#     b=a+j
#     arr3.append(b)
# # print(arr3)    
# for i in arr2:
#     d=l+i 
#     arr4.append(d)
# # print(arr4)
# for k in range(n-1):
#     for m in range (n-1):
#         if(arr3[k]==arr4[m]):
#             print((arr3[k]),(arr4[m]))
# n=int(input())
#         if(n%2!=0):
#             print("yes")
#         else:
#             print("no")
# array1=[1,5,9]
# array2=[2,3,6,7]
# arr3=array1+array2
# arr3.sort()
# n=len(arr3)
# if(n%2!=0):
#     print(arr3[n//2])
# else:
#     print(((arr3[n//2]+arr3[n//2-1])/2))
# num=int(input())
#     if num>1:
#         for i in range(2,(num//2)+1):
#             if(num%i==0):
#                 print("not p")
#                 break
#             else:
#                 print("yes")
#     else:
#          print("not") 
# n= int(input())
# if(n%5==0):
#     print(n//5)
# else:
#     print((n//5)+1)
# for _ in range(int(input())):
#     n=int(input())
#     an=list(map(int,input().split()))
#     if sum(an)%2==1:
#         print('NO')

#     elif an.count(1)%2==1:
#         print('NO')
#     elif an.count(2)%2==0:
#         print('YES')
#     elif an.count(1)-2>0 :
#         print('YES')
#     elif an.count(1)%2==0 and an.count(1)!=0:
#         print('YES')

#     else:
#         print("NO")
# t = int(input())
# for i in range(t):
#     def find(a, b):
#         x = a%b
#         ans = b-x
#         print(ans)
#     a, b = [int(j) for j in input().split()]
#     if (a % b == 0):
#         print(0)
#     elif(b>a):
#         print(b-a)
#     else:
#         find(a,b)
# s="hello world"
# a=s.split() 
# # for spliting the string into form of index
# print(a)
# print(len(a[-1]))
# for _ in range(int(input())):
#     n=int(input())
#     arr=list(map(int,input().split()))
#     x=[]
#     for i in arr:
#         if i%2!=0:
#             x.append(i)
#     for i in arr:
#         if i%2==0:
#             x.append(i)
#     print(*x)
# n=int(input())
# a=list(map(int,input().split()))
# total=(n*(n+1)//2)
# d=sum(a)
# print(total-d)
# n=int(input())
# print(n)
# while n!=1:
#     if n%2==0:
#         n=n//2
#         print(n)
#     else:
#         n=(n*3)+1
#         print(n)



# longest repition 
# n=list(input())
# count=0
# max=0
# for i in range(len(n)-1):
#     if n[i] == n[i+1]:
#         count += 1
#         if max<=count:
#             max=count
#     elif n[i] != n[i+1]:
#         count=0
# print(max+1)   


# Input: s = "a1c1e1"
# Output: "abcdef" 
# 
# class Solution:
    # def replaceDigits(self, s: str) -> str:
    #     n = len(s)
    #     res = ""
    #     for i in range(n):
    #         if i % 2 == 0:
    #             res += s[i]
    #         else:
    #             res += chr(ord(s[i-1]) + int(s[i]))
    #     return res
# Given a string s, return true if the s can be palindrome after deleting at most one character from it.
# class Solution:
#     def validPalindrome(self, s: str) -> bool:
#         l, r = 0, len(s) - 1
#         while l < r:
#             if s[l] != s[r]:
#                 s1, s2 = s[l:r], s[l+1:r+1]
#                 return s1[::-1] == s1 or s2[::-1] == s2
#             l += 1
#             r -= 1
#         return True
# s = "0P"
# d = ""
# for i in s:
#     if ((ord(i) >= 97 and ord(i) <= 122) or (ord(i) >= 65 and ord(i) <= 90)):
                
#         d += i
# d=d.lower()
# if(d==d[::-1]):
#     print(True)
# else:
#     print(False)        
# if(only_alpha.lower()==only_alpha[::-1]):
#     print(True)
# else:
#     print(False)

s = input()
t = input()
if(t==s[::-1]):
    print("YES")
else:
    print("NO")    



        
            
         



