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.
# s = input()
# s2 = s.split('+')
# for i in range(len(s2) - 1):
#     for j in range(len(s2) - 1 - i):
#         if int(s2[j]) > int(s2[j + 1]):
#             s2[j], s2[j + 1] = s2[j + 1], s2[j]
# print('+'.join(s2))

#
# t = int(input())
# for i in range(t):
#     a = input()
#     a2 = a.split()
#     for f in range(len(a2) - 1):
#         for j in range(len(a2) - 1 - f):
#             if int(a2[j]) > int(a2[j + 1]):
#                 a2[j], a2[j + 1] = a2[j + 1], a2[j]
#     print(a2[1])


# n = int(input())
# string = input()
# n1 = string.count('n')
# n0 = string.count('r')
# print(' 1' * n1, '0 ' * n0)

#
# a = input()
# a2 = a.split()
# for i in range(len(a2) - 1):
#     for j in range(len(a2) - 1 - i):
#         if int(a2[j]) > int(a2[j + 1]):
#             a2[j], a2[j + 1] = a2[j + 1], a2[j]
# print(int(a2[2]) - int(a2[0]))


# # Рудольф и переразиние верёвки
# t = int(input())
# for i in range(t):
#     n = int(input())
#     ans = 0
#     for j in range(n):
#         a, b = map(int, input().split())
#         if a > b:
#             ans += 1
#     print(ans)


# # Рудольф и крестики-нолики-плюсики
# t = int(input())
# for i in range(t):
#     a = []
#     for j in range(3):
#         a.append(input())
#     ans = 'DRAW'
#     if a[0][0] == a[1][1] and a[1][1] == a[2][2] and a[0][0] != '.':
#         ans = a[0][0]
#     if a[0][2] == a[1][1] and a[1][1] == a[2][0] and a[0][2] != '.':
#         ans = a[0][2]
#     for j in range(3):
#         if a[j][0] == a[j][1] and a[j][1] == a[j][2] and a[j][0] != '.':
#             ans = a[j][0]
#     for h in range(3):
#         if a[0][h] == a[1][h] and a[1][h] == a[2][h] and a[0][h] != '.':
#             ans = a[0][h]
#     print(ans)



# n = int(input())
# n2 = list(map(int, input().split()))
# d = {}
# for i in n2:
#     if i not in d:
#         d[i] = 1
#     else:
#         d[i] += 1
#
# namber = max(d.values())
# minNamber = 9999
# a = []
# for i, j in d.items():
#     if j == namber:
#         a.append(i)
#
# minA = min(a)
# s = ''
# for i in n2:
#     if i != minA:
#         s = s + str(i) + ' '
#
# print(s + (str(minA) + ' ') * d[minA])



s = list(input())
t = list(input())

t.reverse()
if s == t:
     print('YES')
else:
    print('NO')

