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.
#import sys
#
#count=0
#
#for line in sys.stdin:
#    count +=1
#    if count > 1:
#        if len(line.strip('\n')) <= 10:
#            print(line.strip('\n'))
#        if len(line.strip('\n')) > 10:
#            print(line[0] + str((len(line.strip('\n')))-2) +  line[-2])

#vowels =  ["A", "a", "O", "o", "Y", "y", "E", "e", "U", "u", "I", "i"]
#output = ""
#
#string = input()
#for char in range(len(string)):
#    if string[char] in vowels:
#        pass
#    else:
#        output += "."
#        output += string[char].lower()
#print(output)


#import sys
#
#count=0
#
#for line in sys.stdin:
#    count +=1
#    if count == 2:
#        a = line.strip('\n').split()
#        a.sort()
#        print(a)
#    if count == 3:
#        b = line.strip('\n').split()
#        b.sort()
#        print(b)
#    if count == 4:
#        c = line.strip('\n').split()
#        c.sort()
#        print(c)
#
#count=0
#
#def removeFirstDouble(a, b):
#    if a[0] == b[0]:
#        a.remove(a[0])
#        b.remove(b[0])
#
#removeFirstDouble(a,b)
#print(a)


#print(string[::-1])

import sys

count=0

for line in sys.stdin:
    count +=1
    if count == 1:
        a = line.strip('\n')
    if count == 2:
        b = line.strip('\n')

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




