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.
from bisect import bisect, bisect_left
from cgitb import small
from collections import deque
from io import BytesIO
from itertools import count, starmap
import math
from mimetypes import init
import numbers
from os import  dup, read, fstat
from sys import setrecursionlimit, stdout
from time import perf_counter, time
from math import gcd,log2, sqrt
from tkinter import N
from traceback import print_tb
from turtle import pos, st
from unittest import result
PATH_INPUT = r"C:\Users\APDCL\VSCode\codechef\input.txt"
PATH_OUTPUT = r"C:\Users\APDCL\VSCode\codechef\output.txt"
MOD = 1000000007
#N = 1000001
alphabets = "abcdefghijklmnopqrstuvwxyz"
#digits = "0123456789"
#vowels = "aeiou"
#consonants = "bcdfghjklmnpqrstvwxyz"
def left_binary_search(numbers, target, start, end):
    position = bisect_left(numbers, target, start, end + 1) 
    if position == 0:
        if numbers[0] == target:
            return 0
        else:
            return -1
    if position > end:
        return -1
    else:
        if numbers[position] == target:
            return position
        else:
            return -1

"""
def right_binary_search(numbers, target, start, end):
    position = bisect(numbers, target, start, end + 1) # bisect and bisect_right works similar 
    if position == 0:
        return -1
    if position == end + 1:
        if numbers[end] == target:
            return end
        else:
            return -1
    return position - 1


"""

"""

def prime_check(n):
    if n < 2:
        return False
    if n == 2:
        return True
    if n & 1 == 0:
        return False
    for i in range(3, int(sqrt(n) + 1), 2):
        if n  % i == 0:
            return True
    return False

"""

"""
#sieve for primes


is_prime = [True] * N
is_prime[0] = False
is_prime[1] = False
for i in range(2, int(sqrt(N))):
    add = i + i
    while add < N:
        if is_prime[add]:
            is_prime[add] = False
        add += i
"""
"""
# Factorial 

fact = [1] * N

for i in range(1, N):
    fact[i] = i
for i in range(2, N):
    fact[i] = (fact[i] * fact[i - 1]) % MOD

#Bionomial Coefficient

def ncr(n, r):
    num = den = 1
    num = fact[n]
    den = (fact[n - r] * fact[r]) % MOD
    return (num * pow(den, MOD - 2, MOD)) % MOD

"""


def fast_input(file_no = 0):
    byte_stream = BytesIO(read(file_no, fstat(file_no).st_size))
    return byte_stream


#fi = open(PATH_INPUT, "r")
#io_byte_input = fast_input(fi.fileno())
io_byte_input = fast_input()
#fi.close()
f_input = lambda: io_byte_input.readline().decode().strip()
"""
fo = open(PATH_OUTPUT, "w")
def f_print(*output, sep = "\n"):
    for i in output:
        fo.write(str(i) + sep)
    if sep != "\n":
        fo.write("\n")
def f_print_list(output, sep = " "):
    for i in output:
        fo.write(str(i) + sep)
    if sep != "\n":
        fo.write("\n")
def f_print_2Dlist(output, row = 1, column = 1, sep = " "):
    for i in range(row):
        for j in range(column):
            fo.write(str(output[i][j]) + sep)
        fo.write("\n")
"""

def f_print(*output, sep = "\n"):
    for i in output:
        stdout.write(str(i) + sep)
    #if sep != "\n":
    #    stdout.write("\n")
def f_print_list(output, sep = " "):
    for i in output:
        stdout.write(str(i) + sep)
    if sep != "\n":
        stdout.write("\n")
def f_print_2Dlist(output, row = 1, column = 1, sep = " "):
    for i in range(row):
        for j in range(column):
            stdout.write(str(i) + sep)
        stdout.write("\n")


a = f_input()
b = f_input()
if a == b[::-1]:
    f_print("YES")
else:
    f_print("NO")





    


    
            
#end = time.perf_counter()
#fprint(end - start)
#fo.close()