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.
# obfds >>> Version 8.0
from __future__ import division, print_function
from io import BytesIO, IOBase
import os, sys, math, heapq, itertools, bisect
from string import ascii_lowercase, ascii_uppercase
from collections import deque,defaultdict, OrderedDict, Counter
ii  = lambda : int(input())                           
si  = lambda : input()                               
mi  = lambda : map(int,input().strip().split(" "))   
msi = lambda : map(str,input().strip().split(" "))   
li  = lambda : list(mi())                            
lsi = lambda : list(msi())
iseven = lambda num : num & 1 == 0 # num%2==0                       
isodd = lambda num : num & 1 == 1 # num%2==1                        
positive_infinity : float = float('inf')
negative_infinity : float = float('-inf')

def _obfds_() -> None:
    a = si(); b = si()
    i = 0
    while i < len(a):
        if a[i] == b[-i+1]: pass
        else : break
        i+=1
    if i==len(a)-1: print(f"YES",end="\n")
    else: print(f"NO")
    
if __name__ == "__main__":
    try: from __obfds__ import o_b_f_d_s, _generator_; o_b_f_d_s(); _obfds_(); _generator_(); 
    except (FileNotFoundError,ModuleNotFoundError): _obfds_()