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.
 

#___________________________Afsan Habib_________________________#

import sys
from collections import Counter
from heapq import heapify, heappush, heappop
import copy
from functools import lru_cache
import math
from itertools import combinations, product, permutations
from collections import Counter, defaultdict, deque
from queue import PriorityQueue
from bisect import bisect_left, bisect_right


# import io,os
# stdin = open("testcase.txt")
# def input():
#   return stdin.readline().strip()
# input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
 
mod = 10**9+7

#______________Start class FastIO___________#

class FastIO:

    @classmethod
    def input(cls):
        from sys import stdin
        x = stdin.buffer.readline().decode().strip()
        return x

    @classmethod
    def integer_list(cls):
        return list(map(int, cls.input().split()))

    @classmethod
    def print(cls, s, end = "\n"):
        from sys import stdout
        stdout.write(str(s) + end)

    @classmethod
    def flush(cls):
        from sys import stdout
        stdout.flush()

#______________End class FastIO___________#

 


#___________Start Input Functions___________#

def int_num():
    return (int(input()))

def int_list():
    return list(map(int, input().split()))
 
def string_list():
    return list(map(str, input().split()))
 
def hetro_list():
    return list(input().split())

def pprint(matrix):
    for i in range(len(matrix)):
        print(*matrix[i])
 
def insr():
    s = input()
    return (list(s[:len(s) - 1]))
 
def int_map():
    return(map(int,input().split()))
 
#___________End Input Functions___________#




#___________Start Solve Functions___________#

# n = int(FastIO.input())______lst = FastIO.integer_list()

def solve():
	s=input()
	s1=input()

	if s==s1[::-1]:
		print("YES")
	else:
		print("NO")

    
#___________End Solve Functions___________#
 



#___________Start Main Functions___________#

def main():
		solve()

		return


 
if __name__ == "__main__":
    main()
#___________End Main Functions___________#
