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.
'''a=int(input())
if a>2 and a%2==0:
    print('YES')
else:
    print('No')'''   
'''print(result)    
b=input()
result=0
for i in b:
    result+=int(i)
print(result)''' 
'''n=int(input())
result=''
while n!=0:
    result+=str(n%10)
    n=n//10
print(result)'''
'''for i in range(int(input())):
    a=input()
    if len(a)>10:
        print(a[0]+str(len(a)-2)+a[-1])
    else:
        print(a)'''
'''s=input().lower()
t=input().lower()
if s<t:
    print(-1)
elif s>t:
    print(1)
else:
    print(0)'''
'''s=input()
t=''
if s.find('1111111')==-1 and s.find('0000000')==-1:
    print('NO')
else:
    print('YES')'''
'''s=int(input())
result=0
for i in range(s):
    a=input().split()
    p=int(a[0])
    q=int(a[1])
    if q-2-p>=0:
        result+=1
print(result)   '''
s=input()
t=input()
if s==t[::-1]:
    print('YES')
else:
    print('NO')

