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):
#     s = input()
#     zeores  = s.count('0')
#     ones = s.count('1')
#     if zeores == ones :
#         print(zeores-1)
#     elif zeores < ones:
#         print(zeores)
#     else:
#         print(ones) 
# import math
# t = int(input())
# for i in range(t):
#     a,b = input().split()
#     x = math.ceil(int(a)/int(b))
#     print(x*int(b) - int(a))

# import math
# a,b = map(int,input().split())
# i = 0
# while 3*a <= 2*b : 
#     i+=1
#     a *= 3
#     b *= 2
# print(i+1)
    
# n,k = map(int,input().split())
# for i in range(k) : 
#     if n%10 == 0 :
#         n //= 10
#     else:
#         n -= 1
# print(n)

# n = int(input())
# people = 0
# max = 0
# for i in range(n):
#     exit,enter = map(int,input().split())
#     people = people - exit + enter
#     if people>max : 
#         max = people
# print(max)

# s = input()
# count = 0
# for i in s:
#     if i == '4' or i == '7':
#         count += 1
# if count == 4 or count == 7:
#     print("YES")
# else:
#     print("NO")

s = input()
t = input()
i = 0
while i<len(s):
    if s[i] != t[len(s) - i - 1] :
        break
    i += 1
if i == len(s):
    print("YES")
else:
    print("NO")