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.
# # # def input_matrix():
# # #     print("Enter four floating point numbers:")
# # #     a = []
# # #     count = 0
# # #     while len(a) < 4:
# # #         x = input()
# # #         try:
# # #             val = float(x)
# # #             a.append(val)
# # #         except ValueError:
# # #             continue
# # #     return a
# # #
# # #
# # # print(input_matrix())
# #
# #
# #
# # # def input_matrix():
# # #   print("Enter four floating point numbers:")
# # #   ##########################
# # #   ### START OF YOUR CODE ###
# # #   ##########################
# # #   a = []
# # #   while len(a) < 4:
# # #       x = input()
# # #       try:
# # #           val = float(x)
# # #           a.append(val)
# # #       except ValueError:
# # #           continue
# # #   return tuple(''.join(a))
# # #
# # #
# # # print(input_matrix())
# #
# #
# # # def inverse(M):
# # #     a = M[0] * M[3] - M[2] * M[1]
# # #     if a < 0:
# # #         a = a * (-1)
# # #     b = [M[3]/a, -M[1]/a, -M[2]/a, M[0]/a]
# # #     return b
# # # print(inverse((1.5, 3, 5, 4)))
# #
# #
# # # def f(x):
# # #     if x < 0:
# # #         x *= -1
# # #     x1 = 1
# # #     for i in range(len(str(x))):
# # #         x1 *= int(str(x)[i])
# # #     x = x1
# # #     if len(str(x)) != 1:
# # #         return f(x) + 1
# # #     else:
# # #         return 1
# #
# # # def P(i):
# # #   ##########################
# # #   ### START OF YOUR CODE ###
# # #   ##########################
# # #   if i == 1 or i == 2 or i == 0:
# # #     return 1
# # #   else:
# # #     return P(i - 2) + P(i - 3)
# # # print(P(8))
# #
# # # def part1and2(dataset, threshold):
# #     # summary = []
# #     # c = 0
# #     # d = 0
# #     # f = 0
# #     # o = 0
# #     # u = 0
# #     # t = 0
# #     # l = 0
# #     # b = 0
# #     # h = 0
# #     # for i in dataset:
# #     #     for j in i:
# #     #         if j[0] > threshold:
# #     #             if j[1] == "Cat":
# #     #                 c += 1 / len(dataset)
# #     #             if j[1] == "Dog":
# #     #                 d += 1 / len(dataset)
# #     #             if j[1] == "Fish":
# #     #                 f += 1 / len(dataset)
# #     #             if j[1] == "Other":
# #     #                 o += 1 / len(dataset)
# #     #             if j[1] == "Undecided":
# #     #                 u += 1 / len(dataset)
# #     #             if j[1] == "Turtle":
# #     #                 t += 1 / len(dataset)
# #     #             if j[1] == "Bird":
# #     #                 b += 1 / len(dataset)
# #     #             if j[1] == "Lizard":
# #     #                 l += 1 / len(dataset)
# #     #             if j[1] == "Hamster":
# #     #                 h += 1 / len(dataset)
# #     #
# #     # summary.append((c, "Cat"))
# #     # summary.append((d, "Dog"))
# #     # summary.append((f, "Fish"))
# #     # summary.append((o, "Other"))
# #     # summary.append((u, "Undefined"))
# #     # if b > 0.0:
# #     #     summary.append((b, "Bird"))
# #     # if t > 0.0:
# #     #     summary.append((t, "Turtle"))
# #     # if l > 0.0:
# #     #     summary.append((l, "Lizard"))
# #     # if h > 0.0:
# #     #     summary.append((t, "Hamster"))
# #     # return summary
# #
# # recovered = [{'name': 'Laura', 'tested': [2, 10, 22]}, {'name': 'Sergey', 'tested': [12, 5, 14]}, {'name': 'Thomas', 'tested': [7, 15]}, {'name': 'Angjoo', 'tested': [12, 18, 23]}]
# # # keep = []
# # # for patient in recovered:
# # #     for i in patient['tested']:
# # #         min = min(patient['tested'])
# # #     if min < 5:
# # #         keep = keep.append(patient['name'])
# # # print(keep)
# #
# #
# # # PART 1
# #
# #
# # # PART 2
# #
# # inQuarantine = [{'name': 'Anurak', 'since': 2, 'tested': [2], 'symptoms': ['fever', 'cough', 'loss of smell']},
# #                 {'name': 'Jonas', 'since': 4, 'tested': [6, 4], 'symptoms': ['fever', 'cough']}]
# #
# # day = 0
# # while day <= 30:
# #   if day == 3:
# #     # add the new patient
# #     new_patient = {'name': 'Melanie', 'since': 0, 'tested': [0], 'symptoms': ['fever']}
# #     inQuarantine.append(new_patient)
# #
# #   for patient in inQuarantine:
# #     # update the number of days in quarantine
# #     patient['since'] += 1
# #
# #     # increment the number of days passed since the patient was tested
# #     patient['tested'][0] += 1
# #
# #     if day == 1:
# #       # update the symptoms
# #       if patient['name'] == 'Anurak':
# #         patient['symptoms'].replace('')
# #       elif patient['name'] == 'Jonas':
# #         patient['symptoms'].extend('tiredness')
# #
# #     elif day == 2:
# #       if patient['name'] == 'Anurak':
# #         # correct the typo
# #         patient['name'] = 'Anurag'
# #
# #       elif patient['name'] == 'Jonas':
# #         # add a new test
# #         patient['tested'].append(1)
# #
# #     if day == 2:
# #       # update the symptoms
# #       if patient['name'] == 'Anurak':
# #         patient['symptoms'].add('fever')
# #
# #     if day < 3 or day == 29:
# #         # Show the updates
# #         print('Day: ', day, inQuarantine)
# #         print('-'*80)
# #
# #     day += 1
#
# # Команда
# # x = int(input())
# # result = 0
# # count = 0
# # for i in range(x):
# #     number = input()
# #     z = number.split()
# #     count = z.count("1")
# #     if count >= 2:
# #         result += 1
# #     else:
# #         result += 0
# # print(result)
#
# # Следующий раунд
# # count = 0
# # z = [int(item) for item in input().split()]
# # x = z[1]
# # y = [int(item) for item in input().split()]
# # place = y[x-1]
# #
# # for i in y:
# #     if i == 0:
# #         count += 0
# #     elif i >= place:
# #         count += 1
# #     else:
# #         count += 0
# # print(count)
#
#
# # Упражнение на строки
# # x = input()
# # vowels = ["A", "O", "Y", "E", "U", "I", "a", "o", "y", "e", "u", "i"]
# # count = 0
# # for i in x:
# #     if i in vowels:
# #         x = x.replace(i, "")
# # x = x.lower()
# # x = '.' + '.'.join(x)
# #
# # print(x)
#
# # Юный Физик
# # x = int(input())
# # b = 0
# # total = 0
# # for i in range(x):
# #     z = [int(item) for item in input().split()]
# #     b = sum(z)
# #     total += b
# # #     for i in z:
# # #         total = total + i
# # if total == 0:
# #     print("YES")
# # else:
# #     print("NO")
#
# # Между офисами
# # x = int(input())
# # count_s = 0
# # count_f = 0
# # city = input()
# # for i in range(len(city)-1):
# #     if city[i] == "S" and city[i+1] == "F":
# #         count_s += 1
# #     elif city[i] == "F" and city[i+1] == "S":
# #         count_f += 1
# #     else:
# #         count_f += 0
# #         count_s += 0
# # if count_s > count_f:
# #     print("YES")
# # else:
# #     print("NO")
#
# # Красивая матрица
# # z = []
# # y = 0
# # count = 0
# # for i in range(5):
# #     x = [int(item) for item in input().split()]
# #     z.append(x)
# # for i in z:
# #     if 1 in i:
# #         count += 1
# #         r = count
# #         y = i.index(1) + 1
# #     else:
# #         count += 1
# #
# # print(abs(3-r)+abs(3-y))
#
# # Система регистрации
#
# # x = int(input())
# # list1 = []
# # output = []
# # for i in range(x):
# #     word = input()
# #     list1.append(word)
# #     z = list1.count(word)
# #     if z > 1:
# #         output.append(word + str(1*(z-1)))
# #     else:
# #         output.append("OK")
# # for i in output:
# #     print(i)
#
#
# # z = input()
# # count = 0
# # for i in z:
# #   if i != '':
# #     count += 1
# #     z = z.replace(i, '')
# #     print(z, len(z), count)
# #   if len(z) == 0:
# #     count -=1
# # if count % 2 == 0:
# #   print('CHAT WITH HER!')
# # else:
# #   print('IGNORE HIM!')
#
# # Счастливое число
# # x = int(input())
# # count = 0
# # for i in str(x):
# #   if i == '4' or i == '7':
# #     count += 1
# #   else:
# #     count = 0
# # if count == len(str(x)):
# #   print('YES')
# # elif x % 4 == 0 or x % 7 == 0 or x% 47 == 0:
# #     print('YES')
# # else:
# #   print('NO')
#
# # foo = input()
# # d = ['h', 'e', 'l', 'o']
# # result = []
# # for c in foo:
# #     if c in d:
# #         result.append(c)
# # result = ''.join(result)
# # print(result)
# # if 'helo' in result:
# #   print('YES')
# # else:
# #   print('NO')
#
# # x = [int(item) for item in input().split()]
# # word = list(input())
# # temp = ''
# # for i in range(x[1]):
# #   for i in range(0, x[0]-1, 2):
# #     print(i)
# #     if word[i] == 'B' and word[i+1] == 'G':
# #       word[i+1] = 'B'
# #       word[i] = 'G'
# # print(''.join(word))
#
#
# # def get_permutations(sequence):
# #   if (len(sequence) == 1): return [sequence]
# #   result = []
# #   for i, v in enumerate(sequence):
# #     result += [v + p for p in get_permutations(sequence[:i] + sequence[i + 1:])]
# #   return result
# # print(get_permutations('aa'))
#
#
# # import random
# #
# # list1 = []
# # n = random.randint(3, 21)
# # for element in range(n):
# #   list1.append(random.randint(1, 100))
# #
# # print("My list length is", n)
# # print("List1 (Original list):")
# # print(list1)
# #
# # list2 = []
# # for i in range(n):
# #   if i == 0:
# #     list2.append(list1[i] + list1[i+1])
# #   elif i == n-1:
# #     list2.append(list1[i] + list1[i - 1])
# #   else:
# #     list2.append(list1[i] + list1[i + 1] + list1[i - 1])
# # print("List2(Sum of neighbors of List1):")
# # print(list2)
# #
# # print('List3 (List1 and List2 merged): ')
# # list3 = []
# # for i in range(n):
# #   list3.append(list1[i])
# #   list3.append(list2[i])
# # print(list3)
# #
# # print('List3 with odd numbers removed:')
# # for i in list3:
# #   if (i % 2) != 0:
# #     list3.remove(i)
# # print(list3)
# #
# # list4 = []
# # print('List4 (Summing List3 from two sides): ')
# #
# # x = len(list3)
# # for i in range(x):
# #   if i == 0:
# #     list4.append(list3[i] + list3[i+1])
# #   elif i == n-1:
# #     list4.append(list3[i] + list3[i - 1])
# #   else:
# #     list4.append(list3[i] + list3[i + 1] + list3[i - 1])
# # print(list4)
#
# # import copy
# #
# # def determinantOfMatrix(matrix):
# #
# #   total = 0
# #   if len(matrix) == 1:
# #     return matrix[0][0]
# #   elif len(matrix) == 2 and len(matrix[0]) == 2:
# #     val = matrix[0][0] * matrix[1][1] - matrix[1][0] * matrix[0][1]
# #     return val
# #   else:
# #     for i in range(len(matrix)):
# #       plus_or_minus = (-1)**i
# #       smaller_det = determinantOfMatrix([row[:i] + row[i+1:] for row in (matrix[:0] + matrix[1:])])
# #       total += (plus_or_minus * matrix[0][i] * smaller_det)
# #
# #   return total
# # print(determinantOfMatrix([[2,3,1],
# #                            [-4,5,2],
# #                            [2,1,-4]]))
#
# # def solve(matrix, size):
# #   c = []
# #   d = 0
# #   print(matrix, size)
# #   if size == 0:
# #     for i in range(len(matrix)):
# #       d = d + matrix[i]
# #     return d
# #   elif len(matrix) == 4:
# #     c = (matrix[0] * matrix[3]) - (matrix[1] * matrix[2])
# #     print(c)
# #     return c
# #   else:
# #     for j in range(size):
# #       new_matrix = []
# #       for i in range(size * size):
# #         if i % size != j and i >= size:
# #           new_matrix.append(matrix[i])
# #
# #       c.append(solve(new_matrix, size - 1) * matrix[j] * ((-1) ** (j + 2)))
# #
# #     d = solve(c, 0)
# #     return d
#
#
# # def print_paths(grid):
# #   a, b = 0, 0
# #
# #   if grid[0][0] > grid[-1][-1] or (grid[-1][-1] < grid[-2][-1] and grid[-1][-1] < grid[-1][-2]):
# #     pass
# #
# #   while True:
# #
#
# # Python3 program to Print all possible paths from
# # top left to bottom right of a mXn matrix
#
# #
# # def findPaths(mat, path, i, j):
# #   (M, N) = (len(mat), len(mat[0]))
# #
# #   # if we have reached the last cell, print the route
# #   if i == M - 1 and j == N - 1:
# #     print(path + [mat[i][j]])
# #     return
# #
# #   # include current cell in path
# #   path.append(mat[i][j])
# #
# #   # move right
# #   if 0 <= i < M and 0 <= j + 1 < N:
# #     findPaths(mat, path, i, j + 1)
# #
# #   # move down
# #   if 0 <= i + 1 < M and 0 <= j < N:
# #     findPaths(mat, path, i + 1, j)
# #
# #   # move up
# #   if 0 <= i - 1 < M and 0 <= j < N:
# #     findPaths(mat, path, i - 1, j)
# #
# #   # move left
# #   if 0 <= i < M and 0 <= j - 1 < N:
# #     findPaths(mat, path, i - 1, j)
# #
# #   # remove current cell from path
# #   path.pop()
# #
# #
# # if __name__ == '__main__':
# #   mat = [[1,20,30],
# #           [4,8,40]]
# #   path = []
# #
# #   # start from (0, 0) cell
# #   x = y = 0
# #
# #   findPaths(mat, path, x, y)
#
# # Python3 program to find longest
# # increasing path in a matrix.
#
#
#
#
# # def findPaths(grid, path, i, j):
# #   (M, N) = (len(grid), len(grid[0]))
# #
# #   # if we have reached the last cell, print the route
# #   if i == M - 1 and j == N - 1:
# #     print(path + [grid[i][j]])
# #     return
# #
# #   # include current cell in path
# #   path.append(grid[i][j])
# #
# #   # move right
# #   if 0 <= i < M and 0 <= j + 1 < N:
# #     findPaths(grid, path, i, j + 1)
# #
# #   # move down
# #   if 0 <= i + 1 < M and 0 <= j < N:
# #     findPaths(grid, path, i + 1, j)
# #
# #   # remove current cell from path
# #   path.pop()
# #
# #
# # if __name__ == '__main__':
# #   grid = [
# #     [1, 2, 3],
# #     [4, 5, 6],
# #     [7, 8, 9]
# #   ]
# #
# #   path = []
# #
# #   # start from (0, 0) cell
# #   x = y = 0
# #
# #   findPaths(grid, path, x, y)
#
#
#
#
# import string
#
# ### HELPER CODE ###
# def load_words(file_name):
#   '''
#   file_name (string): the name of the file containing
#   the list of words to load
#
#   Returns: a list of valid words. Words are strings of lowercase letters.
#
#   Depending on the size of the word list, this function may
#   take a while to finish.
#   '''
#   # inFile: file
#   inFile = open(file_name, 'r')
#   # wordlist: list of strings
#   wordlist = []
#   for line in inFile:
#     wordlist.extend([word.lower() for word in line.split(' ')])
#   return wordlist
#
# def is_word(word_list, word):
#   '''
#   Determines if word is a valid word, ignoring
#   capitalization and punctuation
#
#   word_list (list): list of words in the dictionary.
#   word (string): a possible word.
#
#   Returns: True if word is in word_list, False otherwise
#
#   For Example: is_word(word_list, 'bat') returns True
#   and is_word(word_list, 'asdf') returns False
#   '''
#   word = word.lower()
#   word = word.strip(" !@#$%^&*()-_+={}[]|\:;'<>?,./\"")
#   return word in word_list
#
# ### END HELPER CODE ###
#
# WORDLIST_FILENAME = 'words.txt'
#
# class Message(object):
#   def __init__(self, text):
#     self.text = text
#
#   def get_message_text(self):
#     self.message_text = self.text
#     return self.message_text
#
#   def get_valid_words(self):
#     self.valid_words = load_words(WORDLIST_FILENAME)
#     self.valid_words1 = self.valid_words.copy()
#     return self.valid_words1
#
#   def shift_letter(self, letter, key):
#     self.letter = letter
#     self.key = key
#     if self.letter.islower() and self.letter.isalpha():
#       self.alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
#       return str(self.alphabet[(self.alphabet.index(self.letter) + self.key) % len(self.alphabet)])
#     elif self.letter.isupper() and self.letter.isalpha():
#       self.alphabet = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
#       return str(self.alphabet[(self.alphabet.index(self.letter) + self.key) % len(self.alphabet)])
#     else:
#       return self.letter
#
#   def apply_vigenere(self, key):
#     self.keyy1 = key.copy()
#     self.encrypted_message = ''
#     for i in range(len(self.message_text) - len(key)):
#       self.keyy1.append(self.keyy1[i])
#     for j in range(len(self.message_text)):
#       self.encrypted_message += str(self.shift_letter(self.message_text[j], self.keyy1[j]))
#     return self.encrypted_message
#
#
# class PlaintextMessage(Message):
#   def __init__(self, text, key):
#     self.text = text
#     self.keyyy = key
#
#   def get_key(self):
#     self.key1 = self.keyyy.copy()
#     return self.key1
#
#   def get_message_text_encrypted(self):
#
#     self.message_text = self.text
#     return self.apply_vigenere(self.keyyy)
#
#   def change_key(self, key):
#     self.keyyy = key
#
#
# class CiphertextMessage(Message):
#   def __init__(self, text):
#     self.text = text
#
#   def decrypt_message(self):
#     self.message_words = self.text.split()
#     self.message_text1 = self.text
#     self.message_words1 = []
#     self.all_vars = []
#     contin = True
#     for i in range(1, 13):
#       for j in range(1, 13):
#         for k in range(1, 13):
#           contin = True
#           self.keyy = [26 - i, 26 - j, 26 - k]
#           self.decrypted_message = ''
#           for g in range(len(self.text) - len(self.keyy)):
#             self.keyy.append(self.keyy[g])
#           self.message_text = ' '.join(self.message_words)
#           if '--' in self.message_text1:
#             self.message_text = self.message_text.split('--')[0]
#             for h in self.apply_vigenere(self.keyy).split():
#               if is_word(load_words(WORDLIST_FILENAME), h):
#                 self.message_words1.append(h)
#               else:
#                 contin = False
#                 self.message_words1 = []
#                 break
#           else:
#             for h in self.apply_vigenere(self.keyy).split():
#               if is_word(load_words(WORDLIST_FILENAME), h):
#                 self.message_words1.append(h)
#               else:
#                 contin = False
#                 self.message_words1 = []
#                 break
#           if contin:
#             self.message_text = self.message_text1
#             if i == j == k:
#               return ([i], self.apply_vigenere([26 - i, 26 - j, 26 - k]))
#             else:
#               return ([i, j, k], self.apply_vigenere([26 - i, 26 - j, 26 - k]))
#
# if __name__ == '__main__':
#   '''
#   Can you find out what this hidden message says?
#   Uncomment the next lines to find out!
#   '''
#   # ciphertext = CiphertextMessage('"Drmu spna vwvu bz ay nbmhd zmqlxbpcbz boo dkg dpli ky ay nbmhd teapmqhxa kvk ijdwyc, mqcstpjiaswu epvt tctz ay arm xmed sodlv" [Jysiu Oyomuo]')
#   # decrypted = ciphertext.decrypt_message()
#   # print(decrypted[1])
#   pass
#
#
# c = CiphertextMessage('"Oz Jzf Eclty Qzc Alddtyr Epded zc Oz Jzf Eclty Qzc Ncpletgp Tybftcj?" --Yzlx Nszxdvj')
# d = c.decrypt_message()
# print(d)

word = input()
word1 = input()
if word != word1[::-1]:
  print('NO')
else:
  print('YES')