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())
if n==2 or n%2==1:
    print("NO")
else:
    print("YES")"""

"""n=int(input())
for i in range(n):
    str=input()
    l=len(str)
    if l<=10:
        print(str)
    else:
        x="{}".format(l-2)
        print(str[0]+x+str[-1])"""
"""n=int(input())
x=0
for i in range(n):
    a,b,c=input().split()
    if a=="1" and b=="1" :
        x+=1
    elif a=="1" and c=="1":
        x+=1
    elif b=="1" and c=="1":
        x+=1
print(x)"""
"""n,k=map(int,input().split())
scores=list(map(int,input().split()))
z=0
for points in scores:
    if points>=scores[k-1] and points!=0:
        z+=1
print(z)"""
"""n,m=map(int,input().split())
print((n*m)//2)"""
"""n=int(input())
X=0
for i in range(n):
    oper=input()
    if oper=="++X" or oper=="X++":
        X+=1
    elif oper=="--X" or oper=="X--":
        X-=1
print(X)"""
"""
for i in range(1,6):
    m=list(map(int,input().split()))
    #r,c=0,0
    for j in range(1,6):
        if m[j-1]==1:
            print(abs(i-3)+abs(j-3))
            break"""
# ip1=input()
# ip2= input()
# ip1=ip1.lower()
# ip2=ip2.lower()
# if ip1>ip2:
#     print(1)
# elif ip1<ip2:
#     print(-1)
# elif ip1==ip2:
#     print(0)
#231A
# hlp=input()
# lst=[]
# for w in hlp :
#     if w!='+':
#         lst.append(w)
# lst.sort()
# # print(lst)
# hlp=""
# for i in lst[:-1]:
#     hlp+=i+'+'
# print(hlp+lst[-1])
# c=input()
# print(c[0].upper()+c[1:])
# ch=input()
# set=set(ch)
# n=0
# for s in set:
#     n+=1
# #print(set)
# if n&1:
#     print("IGNORE HIM!")
# else:
#     print("CHAT WITH HER!")
# n=int(input())
# str=input()
# count=0
# for i in range(n-1):
#     if str[i]==str[i+1]:
#         count+=1
# print(count)
# a,b=map(int,input().split())
# count=0
# while(a<=b):
#     count+=1
#     a=a*3
#     b=b*2
# print(count)
# k,n,w=map(int,input().split())
# tc=0
# for i in range(1,w+1):
#     tc+=k*i
# if tc<n:
#     print(0)
# else:   
#     print(tc-n)
# x=int(input())
# count=0
# if x%5==0:
#     count=x//5
# else:
#     count=x//5+1
# print(count)
# str=input()
# c1=0
# for letter in str:
#     if letter.isupper():
#         c1+=1
# if (len(str)-c1)>=c1:
#     print(str.lower())
# else:
#     print(str.upper())
# n,k=map(int,input().split())
# while(k>0):
#     ld=n%10
#     if ld==0:
#         n=n//10
#     else:
#         n=n-1
#     k-=1
# print(n)
# n=int(input())
# c1=0
# while(n>0):
#     r=n%10
#     if r==4 or r== 7:
#         c1+=1
#     n=n//10
# if c1==4 or c1==7:
#     print("YES")
# else:
#     print("NO")
# n=int(input())
# passengers_in_tram=0
# ans=0
# while n>0:
#     a,b=map(int,input().split())
#     #temp=passengers_in_tram
#     passengers_in_tram=(passengers_in_tram-a)+b
#     ans=max(passengers_in_tram,ans)
#     #print(ans)
#     n-=1
# print(ans)
s=input()
t=input()
if s==t[::-1]:
    print("YES")
else:
    print("NO")