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.
#Boy or Girl
'''name=input()
counter=0
for c in name:
    if name.count(c)==1:
        counter+=1
print(counter)
if counter % 2==0:
    print("CHAT WITH HER!")
else:
    print("IGNORE HIM!")'''
    
#word
'''word=input()
lowercase=0
uppercase=0
for i in word:
      if(i.islower()):
            lowercase+=1
      elif(i.isupper()):
            uppercase+=1
if lowercase>uppercase:
    print(lower(word))
if lowercase<uppercase:
    print(word.capitalize())
if lowercase==uppercase:
    print(lower(word))
#Magic Numbers'''
'''number=int(input())
if true:
    for character in s:
        if character.isdigit(1,4)
            print("YES")
else:
    print("NO")'''
#Translation
word1=input()
word1backwards=input()
if word1backwards==word1[::-1]:
    print("YES")
else:
    print("NO")
