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.
_1 = '236a'
# count = 0
# l = [list(map(int, input().split())) for i in range(5)]
# for i in range(5):
#     for j in range(5):
#         if l[i][j] == 1:
#
#             if i > 2:
#                 count += i - 2
#             elif i < 2:
#                 count += 2 - i
#             if j > 2:
#                 count += j - 2
#             elif j < 2:
#                 count += 2 - j
# print(count)
_2 = '339a'
# n = list(map(str, input().split('+')))
# n.sort()
# print('+'.join(n))
_3 = '266a'
# count = 0
# t = 0
# n1 = int(input())
# n = list(str(input()))
# for i in range(1,n1,1):
#     if n[i] == n[i-1]:
#         count +=1
# print(count)
_4 = '96a'
# flag = False
# flag1 = False
# p0=0
# p1=0
# l = list(str(input()))
# for i in l:
#     if i == '0':
#         p0 += 1
#         if p0 >= 7:
#             flag = True
#     else:
#         p0 = 0
# for i in l:
#     if i == '1':
#         p1 += 1
#         if p1 >= 7:
#             flag1 = True
#     else:
#         p1 = 0
# if flag == True or flag1 == True:
#     print("YES")
# else:
#     print("NO")
_5 = '236a'
# l = list(str(input()))
# if len(set(l)) % 2 == 0:
#     print("CHAT WITH HER!")
# else:
#     print("IGNORE HIM!")
_6 = '281a'
# l = list(str(input()))
# t = l[0].upper()
# print(t + ''.join(l[1:]))
_7 = '546a'
# s = 0
# a,b = map(int, input().split())
# while a <= b:
#     a*=3
#     b*=2
#     s+=1
# print(s)
_8 = '116a'
# t = 0
# l1 = []
# n = int(input())
# l = [list(map(int, input().split())) for i in range(n)]
# for i in range(n):
#     t += l[i][1]
#     t -= l[i][0]
#     l1.append(t)
# print(max(l1))
_9 = '977a'
# n,k = map(int, input().split())
# for i in range(k):
#     if n % 10 == 0:
#         n/=10
#     else:
#         n-=1
# print(int(n))
_10 = '266b'
# n = str(input())
# l = list(n)
# low = 0
# up = 0
# for i in l:
#     if i.islower():
#         low += 1
#     else:
#         up += 1
# if low >up:
#     print(n.lower())
# elif low < up:
#     print(n.upper())
# else:
#     print(n.lower())
_11 = '110a'
# n = list(str(input()))
# l=[]
# for i in range(len(n)):
#     if n[i] == '4' or n[i] == '7':
#         l.append(i)
# if len(l) == 4 or len(l) == 7:
#     print('YES')
# else:
#     print('NO')
_12 = '41a'

n = str(input())
n1 = str(input())
if n1 == n[::-1]:
    print('YES')
else:
    print("NO")
