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.
# n=int(input())
# o1="No"
# for i in range(n):
#     x=int(input())
#     y=str(input())
#     y1=list(y)
#     print(y1)
#     for j in range(x):
#         if y[j]=='Q':
#             for a in y[j:]:
#                 if a=='A':
#                     o1="Yes"
#                     y1.remove(a)
#                 else:
#                     o1="No"
#     print(o1)
# ___________________________________________ yet
# n=int(input())
# sum=0
# for i in range(n):
#     x="no"
#     line1=input().split()
#     sum=int(line1[0])
#     if (int(line1[1])+int(line1[2]))==sum:
#         x="yes"  
#     sum=int(line1[2])
#     if (int(line1[0])+int(line1[1]) )==sum:
#         x="yes"
#     sum=int(line1[1])
#     if (int(line1[0])+int(line1[2])==sum):
#         x="yes"
#     print(x)
# ___________________________________________________________Done 
# n=int(input())
# for i in range(n):
#     x=input().split()
#     t1=x[0]
#     t2=x[1]
#     max='>'
#     if t1==t2:
#         max='='
#     if t2[-1]=='S'and t1[-1]=='S':
#         if len(t1)>len(t2):
#             max='<'
#     if t2[-1]=='L' and t1[-1]=='L':
#         if len(t2)>len(t1):
#             max='<'
#     if t2[-1]=='L' and t1[-1]=='M':
#         max='<'
#     if t2[-1]=='L' and t1[-1]=='S':
#         max='<'
#     if t2[-1]=='M' and t1[-1]=='S':
#         max='<'
#     print(max)
# ___________________________________________________________Done
# w=int(input())
# x=w/2
# y=w/2
# if w>2:
#     if x%2==0 and y%2==0:
#         print("YES")
#     else:
#         x+=1
#         y-=1
#         if x%2==0 and y%2==0:
#             print("YES")
#         else:
#             print("NO")
# else:
#     print("NO")
# ____________________________________________________________________Done
# n=int(input())
# a=''
# b=''
# for i in range(n):
#     x=str(input())
#     w=len(x)
#     if w<=10:
#         print(x)
#     else:
#         for j in x:
#             if j in x[0] :
#                 a=j
#                 b=j
#         if j in x[-1]:
#             b=j  
#         o=(a+str(len(x)-2)+b)
#         print(o)
# ________________________________________Done
# n=int(input())
# o=0
# for i in range(n):
#     c0=0
#     c1=0
#     x=input().split()
#     for i in x:
#         if i=='0':
#             c0+=1
#         else:
#             c1+=1
#     if c1>=2:
#         o+=1
# print(o)
# _______________________________________________________________Done
# a= input().split()
# n=int(a[0])
# x=int(a[1])
# c=0
# k=input().split()
# k1=[]
# for d in k:
#     d=int(d)
#     k1.append(d)
# count=0
# for i in k1:
#     count+=1
#     if count==x:
#         x=i
#         break
# for j in k1:
#     if j>0 and j>=x:
#         c+=1
# print(c) 
# _______________________________________________________Done
# n=input().split()
# a=int(n[0])
# b=int(n[1])
# x=0
# r=a*b
# c=0
# for i in range(r):
#     if r-2>=x:
#         x+=2
#         c+=1
# print(c)
# _______________________________________________________________Done
# x=0
# n=int(input())
# for i in range(n):
#     s=input()
#     if '++' in s:
#         x+=1
#     elif '--'in s:
#         x-=1
# print(x)
# _____________________________________________________________________Done

# x=input().lower()
# y=input().lower()
# if x<y:
#     print(-1)
# elif y<x:
#     print(1)
# else:
#     print(0)
# ___________________________________________________________________Done
# n=input().split("+")
# x1=[]
# x2=[]
# x3=[]
# c=[]
# for i in n:
#     if i =='1':
#         x1.append(i)
#     elif i=='2':
#         x2.append(i)
#     elif i=='3':
#         x3.append(i)
# for i in x1:
#     c.append(int(i))
# for i in x2:
#     c.append(int(i))
# for i in x3:
#     c.append(int(i))
# count=0
# for i in c:
#     count+=1
#     if count!=len(c):
#         print(int(i),end="+")
#     else:
#         print(int(i),end="")
#________________________________________________________________Done
# w=input()
# count=1
# for i in w:
#     if count==1:
#         x=i.capitalize()
#     count+=1
# print(x+w[1:])
# __________________________________________________________________Done
# m=input()
# m1=''
# o=''
# for i in m:
#     if i not in m1:
#         m1+=i
# if len(m1)%2==0:
#     o="CHAT WITH HER!"
# else:
#     o="IGNORE HIM!"
# print(o)
# ________________________________________________________________________Done
# n=input()
# s=input()
# s2=[]
# for i in s:
#     s2.append(i)
# s1=s[0]
# o=0
# c=0
# for i in s2[1:]:
#     if i==s2[c]:
#         o+=1
#         s1=i
#     c+=1       
# print(o)
# _____________________________________________________________________Done
# n=input().split()
# a=int(n[0])
# b=int(n[1])
# for i in range(100):
#     a*=3
#     b*=2
#     if a>b:
#         print(i+1)
#         break
# _________________________________________________________________________Done
# n=int(input())
# c=0
# c2=0
# for i in range(n):
#     x=input().split()
#     for j in range(len(x)):
#         if x[j]=="1":
#             c+=1
#     if (x.count("1")>=2):
#         c2+=1
# print(c2) 
#__________________________________________________________________________Done  
# f=input().split()
# cost=int(f[0])
# dollars=int(f[1])
# numofbanana=int(f[2])
# x=0
# y=0
# for i in range(1,numofbanana+1):
#      x=cost*i
#      y+=x    
# m=dollars-y
# if m>=0:
#     print(0)
# else:
#     print(abs(m))
#___________________________________________________________________Done
# n=int(input())
# c=0
# x=0
# y=n
# l=[5,4,3,2]
# i=5
# while y>0:
#         x=n/i
#         c+=1
#         y=y-i
# else:
#     i-=1 
# print(c)
# _______________________________________________________________Done
# word=input()
# l=0
# u=0
# for i in word:
#     if i ==i.upper():
#         u+=1
#     else:
#         l+=1
# if l>=u:
#     word=word.lower()
# else:
#     word=word.upper()
# print(word)
# _____________________________________________________________________Done
# n=input().split()
# a=int(n[0])
# b=int(n[1])
# for i in range(b):
#     if a%10==0:
#         a=int(a)/10
#     else:
#         a=int(a)-1
# print(int(a))
# _______________________________________________________________Done
# n=input()
# yes=0
# no=0
# for i in n:
#     if i=='7' or i=='4':
#         yes+=1
#     else:
#         no+=1

# if yes==7 or yes==4:
#     print("YES")
# else:
#     print("NO")
#_______________________________________________________________Done
# n=int(input())
# x=input()
# a=0
# d=0
# for i in x:
#     if i=='A':
#         a+=1
#     else:
#         d+=1
# if a>d:
#     print("Anton")
# elif d>a:
#     print("Danik")
# else:
#     print("Friendship")
# __________________________________________________________________Done
w1=input()
w2=input()
x=int(len(w2))-1
o=0
o1=0
for i in w1:
    if str(i)==str(w2[x]):
        o+=1
    else:
        o1+=1
    x-=1
if o1==0:
    print("YES")
else:
    print("NO")

        
        
    
        
    