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.
'''s=iter(input())
if all(c in s for c in 'hello'):
    print("YES")
else:
    print("NO")'''
'''n,t=map(int,input().split())
s=input()
while t:
    s=s.replace("BG","GB")
    t-=1
print(s)'''
'''n=int(input())
if all(n%i for i in [4,7,47,744,477]):
    print("NO")
else:
    print("YES")'''
'''s=input();print([s.lower(),s.upper()][sum(x<'['for x in s)*2>len(s)])'''
'''print('NYOE S'[sum(i in'47'for i in input())in(4,7)::2])'''
'''n,m,a=map(int,input().split())
print(-n//a*(-m//a))'''
'''n=input()
l=sorted(map(int,input().split()))
s=c=0
while s<=sum(l):
    s+=l.pop()
    c+=1
print(c)'''
s=input()
t=input()
if s[::-1]==t:
    print("YES")
else:
    print("NO")



