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.

# # # # # # # # x=int(input("ГОНИ ЧИСЛО: "))
# # # # # # # # y=int(input("ГОНИ ЧИСЛО: "))
# # # # # # # # y=int(input("ГОНИ ЧИСЛО: "))

# # # # # # # # x=0
# # # # # # # # while x<1001:
# # # # # # # #     print(x)
# # # # # # # #     x=x+1
    
# # # # # # # # k=['apple', 'banana', 'orange', 'tomato' ]
# # # # # # # # x=-1
# # # # # # # # while x<=3:
# # # # # # # #    print(k[x])
# # # # # # # #    x=x-1 
# # # # # # # # k=['apple', 'banana', 'orange', 'tomato' ]
# # # # # # # # x=0
# # # # # # # # while x<=3:
# # # # # # # #    print(k[x])
# # # # # # # #    x=x+1 

# # # # # # # # x=input()
# # # # # # # # x=int(x)
# # # # # # # # if x%2==0:
# # # # # # # #    print('чётное')
# # # # # # # # else:
# # # # # # # #    print('нечётное')
# # # # # # # # import time
# # # # # # # # x=0
# # # # # # # # while x<999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999:
# # # # # # # #    print(x)
# # # # # # # #    x=x+1
# # # # # # # #    time.sleep(1)

# # # # # # # # x=[12,123,54256,65747,567878967,969,89,8,9087,79,79,0,90,9,909]
# # # # # # # # o=0
# # # # # # # # while o!=14:
# # # # # # # #    if x[o]%2==0:
# # # # # # # #       print(x[o])
# # # # # # # #    o=o+1

# # # # # # # # x=0
# # # # # # # # while x<5:
# # # # # # # #     print(x)
# # # # # # # #     x=x+1

# # # # # # # # x=[1,2,3,4,5,6,7,8,9,0]
# # # # # # # # d=0

# # # # # # # # while d<=9:
# # # # # # # #     print(x[d])
# # # # # # # #     d=d+1

# # # # # # # # x=int(input('Размер твоей ноги с двумя нолями в конце: '))
# # # # # # # # z=int(input('Текущий год: '))
# # # # # # # # c=int(input('Размер ноги и годы жизни вместе: '))
# # # # # # # # print(x-(c-z), 'Год рождения')

# # # # # # # # x=int(input('Размер твоей ноги с двумя нолями в конце: '))
# # # # # # # # z=int(input('Дата рождения: '))
# # # # # # # # c=int(input('Размер ноги и годы жизни вместе: '))
# # # # # # # # print('Текущий год',z+(c-x))

# # # # # # # # x=open('100.txt', 'w+')
# # # # # # # # q=0
# # # # # # # # while q!=1:
# # # # # # # #     x.write('Hello, world\n')
# # # # # # # #     q+=1

# # # # # # # # x=int(input('ВВеди число больше 100 000 000 000:'))
# # # # # # # # z=0
# # # # # # # # while z!=x:
# # # # # # # #     print('*')
# # # # # # # #     z=z+1

# # # # # # # # n=6471598560786075349010
# # # # # # # # x=1
# # # # # # # # while n>0:
# # # # # # # #     x*=n
# # # # # # # #     print(x)
# # # # # # # #     n-=1

# # # # # # # # x=input('Выбери мат. действие + - / *')
# # # # # # # # if x=='/':
# # # # # # # #     t=input('Скока?')
# # # # # # # #     t=int(t)
# # # # # # # #     d=input('гони число...')
# # # # # # # #     d=int(d)
# # # # # # # #     print(t/d)
# # # # # # # # if x=='+':
# # # # # # # #     g=input('Скока?')
# # # # # # # #     g=int(g)
# # # # # # # #     f=input('гони число...')
# # # # # # # #     f=int(f)
# # # # # # # #     print(g+f)
# # # # # # # # if x=='-':
# # # # # # # #     h=input('Скока?')
# # # # # # # #     h=int(h)
# # # # # # # #     l=input('гони число...')
# # # # # # # #     l=int(l)
# # # # # # # #     print(h-l)
# # # # # # # # if x=='*':
# # # # # # # #     c=input('Скока?')
# # # # # # # #     c=int(c)
# # # # # # # #     m=input('гони число...')
# # # # # # # #     m=int(m)
# # # # # # # #     print(c*m)

# # # # # # # # x=499
# # # # # # # # while x<=1500:
# # # # # # # #     print(x)
# # # # # # # #     x=x+1

# # # # # # # # x=input('число...')
# # # # # # # # x=int(x)
# # # # # # # # if x%100==18:
# # # # # # # #     print("OK")
# # # # # # # # else:
# # # # # # # #     print('not OK')

# # # # # # # # s=[4,7,12,67,56,45,79]
# # # # # # # # for i in s:
# # # # # # # #     if i%2==0:
# # # # # # # #         print(i)

# # # # # # # # g=1
# # # # # # # # x=input('chislo')
# # # # # # # # x=int(x)
# # # # # # # # while x!=0:
# # # # # # # #     g*=x
# # # # # # # #     x-=1


# # # # # # # # x=[2,3,6,7,6,75,7,57,5,7,56,8,74,6,57,5,63,6,5,34]
# # # # # # # # for i in x:
# # # # # # # #     if i<3:
# # # # # # # #         print(i)

# # # # # # # # r=''
# # # # # # # # x="hello"
# # # # # # # # y=len(x)-1
# # # # # # # # while y>=0:
# # # # # # # #     r+=x[y]
# # # # # # # #     y-=1
# # # # # # # # print(r)

# # # # # # # # x=input('кг')
# # # # # # # # x=int(x)
# # # # # # # # if x%2==0:
# # # # # # # #     if (x//2)%2==0:
# # # # # # # #         print('Ok')
# # # # # # # #     else:
# # # # # # # #         print('NET')
# # # # # # # # else:
# # # # # # # #     print('NET')

# # # # # # # # r=''
# # # # # # # # x='hello milonka!'
# # # # # # # # y=len(x)-1
# # # # # # # # while y>=0:
# # # # # # # #     if x[y]==" ":
# # # # # # # #         r+="_"
# # # # # # # #         y=y-1
# # # # # # # #     elif x[y]=="l":
# # # # # # # #         r+='!'
# # # # # # # #         y=y-1
# # # # # # # #     else:
# # # # # # # #         r+=x[y]
# # # # # # # #         y=y-1
# # # # # # # # print(r)

# # # # # # # # # print('hello, world')

# # # # # # # # # x=input('гони число:')
# # # # # # # # # y=input("а то сожру:")
# # # # # # # # # x=int(x)
# # # # # # # # # y=int(y)
# # # # # # # # # print(y/x)

# # # # # # # # # s=input('введи имя:')
# # # # # # # # # print('приятно познакомиться '+s)

# # # # # # # # # s='3'
# # # # # # # # # print(type(s))
# # # # # # # # # s=int(s)
# # # # # # # # # print(type(s))

# # # # # # # # # a=input('введи число ')
# # # # # # # # # a=int(a)
# # # # # # # # # b=input('2 число ')
# # # # # # # # # b=int(b)
# # # # # # # # # print(+a+b, a*b, a/b, a-b, a%b, a**b)

# # # # # # # # # s=0
# # # # # # # # # while s<100:
# # # # # # # # #     print(s)
# # # # # # # # #     s+=1

# # # # # # # # # d=input('скока бабла? ')
# # # # # # # # # d=int(d)
# # # # # # # # # print(d//50)

# # # # # # # # # d=input('скока бабла? ')
# # # # # # # # # d=int(d)
# # # # # # # # # print(d*50)

# # # # # # # # # x=input('возраст: ')
# # # # # # # # # y=input('число: ')
# # # # # # # # # r=input('месяц: ')
# # # # # # # # # x=int(x)
# # # # # # # # # r=int(r)
# # # # # # # # # y=int(y)
# # # # # # # # # if x<18 or y>31 or r>12:
# # # # # # # # #     print('иди нафиг')
# # # # # # # # # elif x>18 and x<40:
# # # # # # # # #     print('окей летс го')

# # # # # # # # # x=input('скока бабла? ')
# # # # # # # # # x=int(x)
# # # # # # # # # if x>1000:
# # # # # # # # #     print("проходите")
# # # # # # # # # else:
# # # # # # # # #     print('валяй отсюда')

# # # # # # # # # x=input('тебя ударили')
# # # # # # # # # y=input('что ты сделаешь? ударишь, кинешь в него ручкой или нажалуешься училке?')
# # # # # # # # # w=input('напиши числом')
# # # # # # # # # w=int(w)
# # # # # # # # # if w=1:
# # # # # # # # #     print('тебя заново обозвали')
# # # # # # # # # elif w=2:
# # # # # # # # #     print('тебя наругала училка')
# # # # # # # # # elif w=3:
# # # # # # # # #     print('у тебя всё получилось')

# # # # # # # # x=int(input())
# # # # # # # # if x==12 or x==1 or x==2:
# # # # # # # #     print('zima')
# # # # # # # # elif x==3 or x==4 or x==5:
# # # # # # # #     print('vesna')
# # # # # # # # elif x==6 or x==7 or x==8:
# # # # # # # #     print('leto')
# # # # # # # # elif x==11 or x==10 or x==9:
# # # # # # # #     print('oceni')

# # # # # # # # x=500
# # # # # # # # c=0
# # # # # # # # while x<=1000:
# # # # # # # #     c+=x
# # # # # # # #     x+=1
# # # # # # # #     print(c)

# # # # # # # # s=0
# # # # # # # # for i in range(1,6):
# # # # # # # #     s+=i
# # # # # # # # print(s)

# # # # # # # # v=0
# # # # # # # # s=0
# # # # # # # # for i in range(1,1001):
# # # # # # # #     if i%2!=0:
# # # # # # # #         s+=i
# # # # # # # #     if i%2!=0:
# # # # # # # #         v+=1
# # # # # # # # print(s/v)

# # # # # # # # x=0
# # # # # # # # for i in range(1,1001):
# # # # # # # #     if i%4==0 and i%5!=0:
# # # # # # # #         x+=1
# # # # # # # # print(x)

# # # # # # # # x=int(input())
# # # # # # # # if x==90:
# # # # # # # #     print('pryamoy')
# # # # # # # # elif x<90:
# # # # # # # #     print('ostriy')
# # # # # # # # elif x>90:
# # # # # # # #     print('typoy')

# # # # # # # # a=int(input())
# # # # # # # # b=int(input())
# # # # # # # # c=int(input())
# # # # # # # # if c**2==a**2+b**2:
# # # # # # # #     print('aboba')
# # # # # # # # else:
# # # # # # # #     print('idi naxfig')

# # # # # # # # x=int(input())
# # # # # # # # while x<20 or x==20:
# # # # # # # #     print(x)
# # # # # # # #     x=x*3

# # # # # # # # d=int(input('введите число'))
# # # # # # # # x=(d-1)
# # # # # # # # v=(d+1)
# # # # # # # # print(x*v)

# # # # # # # # x=int(input())
# # # # # # # # v=int(input())
# # # # # # # # print(x**v)

# # # # # # # # x=int(input())
# # # # # # # # u=int(input())
# # # # # # # # b=int(input())
# # # # # # # # if x==u==b:
# # # # # # # #     print(3)
# # # # # # # # elif x==u or x==b or u==b or b==x:
# # # # # # # #     print(2)
# # # # # # # # else:
# # # # # # # #     print(0)

# # # # # # # # x=int(input())
# # # # # # # # if x>1000 and x<=9999:
# # # # # # # #     print(4)
# # # # # # # # if x>10000 and x<=99999:
# # # # # # # #     print(5)
# # # # # # # # if x==100000:
# # # # # # # #     print(6)

# # # # # # # # k=int(input())
# # # # # # # # n=int(input())
# # # # # # # # print(k//n)
# # # # # # # # print(k%n)

# # # # # # # # s=0
# # # # # # # # d=int(input())
# # # # # # # # c=(d+1)
# # # # # # # # for i in range(1, c):
# # # # # # # #     s+=i
# # # # # # # # print(s)

# # # # # # # # x=int(input())
# # # # # # # # s=0
# # # # # # # # while x>0:
# # # # # # # #     print(s+x%10)
# # # # # # # #     s+=x//10

# # # # # # # # x=int(input())
# # # # # # # # s=0
# # # # # # # # while x>0:
# # # # # # # #     s+=x%10
# # # # # # # #     x=x//10
# # # # # # # # print(s)

# # # # # # # # x=int(input())
# # # # # # # # c=int(input())
# # # # # # # # while x>0:
# # # # # # # #     print(s*x)

# # # # # # # # import time
# # # # # # # # x='ugiuirregkweНпнhввавfdFDHFDВРаЖ:'
# # # # # # # # v=0
# # # # # # # # while v<=100:
# # # # # # # #     print(x, v, '%')
# # # # # # # #     time.sleep(0.1)
# # # # # # # #     v+=1

# # # # # # # # v=0
# # # # # # # # c=0
# # # # # # # # x=input()
# # # # # # # # for i in x:
# # # # # # # #     if i=='D':
# # # # # # # #         c+=1
# # # # # # # #     elif i=='A':
# # # # # # # #         v+=1
# # # # # # # # if c>v:
# # # # # # # #     print('D')
# # # # # # # # elif v>c:
# # # # # # # #     print('A')

# # # # # # # # a=int(input())
# # # # # # # # b=int(input())
# # # # # # # # c=int(input())
# # # # # # # # if a+b==c or a+c==b or b+c==a:
# # # # # # # #     print("lox")
# # # # # # # # else:
# # # # # # # #     print('ne lox')

# # # # # # # x=input()
# # # # # # # if 'y' in x and 'e' in x and 's' in x:
# # # # # # #     print('hernia')
# # # # # # # else:
# # # # # # #     print('net')

# # # # # # v=0
# # # # # # c=(input())
# # # # # # for i in c:
# # # # # #     if i=='7' or i=='4':
# # # # # #         v+=1
# # # # # # if v==4 or v==7:
# # # # # #     print('hernia.02')
# # # # # # else:
# # # # # #     print('Idyot petya')

# # # k=int(input())
# # # x=[1,2,4,6,8,9,12,14,18]
# # # l=0
# # # r=len(x)-1
# # # while x[r]+x[l]!=k:
# # #     if x[l]+x[r]>k:
# # #         r-=1
# # #     elif x[l]+x[r]<k:
# # #         l+=1
# # # print(l,r)

# # # # x=[1,2,4,6,8,9,12,14,18]
# # # # l=0
# # # # r=1
# # # # while r<=8:
# # # #     print(x[l],x[r])
# # # #     l+=1
# # # #     r+=1

# # # x=[1,2,4,6,8,9,12,14,18]
# # # for i in range(len(x)):   
# # #     print(x[i],x[i+1])

# # # # x=[1,2,1,1]
# # # # r=1
# # # # l=0

# # # # x={}

# # # # x['a']=5
# # # # x["t"]=6
# # # # if 'a' in x:
# # # #     print("ok")

# # # s={}
# # # x='khjhjassddasdfttfd'
# # # for i in x:
# # #     if i not in s:
# # #         s[i]=0
# # #     s[i]+=1
# # # for i in s:
# # #         print(i,s[i])


# # # a=[-5, -6, -7,-8,-3,-5]
# # # q=a[0]
# # # for i in a:
# # #     if i>q:
# # #         q=i
# # # print(q)

# x=input()
# s={}
# q=0
# for i in x:
#     if i not in s:
#         s[i]=0
#     s[i]+=1
# for i in s:
#     print()

# # # x = input()
# # # if 'Y' in x or 'y' in x and 'E' in x or 'e' in x and 'S' in x or 's' in x:
# # #     print('yes')
# # # else:
# # #     print('no')

# # # s=input()
# # # s=s.upper()
# # # if 'Y' in s and 'E' in s and 'S' in s:
# # #     print('yes')
# # # else:
# # #     print('no')

# # # v=0
# # # k=0
# # # x=input()
# # # x=x.upper()
# # # for i in x:
# # #     if i =="J":
# # #         k+=1
# # #     if i =="K":
# # #         v+=1
# # # print('j', k)
# # # print('k', v)

# # # x=input()
# # # print(x[len(x)//2])

# y=input()
# s=len(y)-1
# while s>=0:
#     print(y[s])
#     s-=1

# # # p="jhjgguytyrtsweshuiioujihuihuihuihuih"
# # # k=0
# # # p=p.upper()
# # # for i in p:
# # #     if i =="H":
# # #         k+=1   
# # # print('H', k)

# # # x="jhjgguytyrtsweshuiioujihuihuihuihuih"
# # # for i in range(len(x)-1):   
# # #     print(x[i],x[i+1])

# # # x=[4,5,3,45,6,53,67,43,42,78]
# # # for i in range(len(x)-1):   
# # #     print(x[i],x[i+1])

# # # x=int(input())
# # # c=x//10000 
# # # v=x//1000%10
# # # b=x//100%10
# # # n=x//10%10
# # # m=x%10
# # # print(c+v+b+n+m)

# # # x=int(input())
# # # x1=x//100000
# # # x2=x//10000%10
# # # x3=x//1000%10
# # # x4=x//100%10
# # # x5=x//10%10
# # # x6=x%10
# # # if x1+x2+x3==x4+x5+x6:
# # #     print('UwU')
# # # else:
# # #     print('Ne UwU')

# # # x=input()
# # # a=0
# # # o=0
# # # x=x.upper()
# # # for i in x:
# # #     if i=='A':
# # #         a+=1
# # #     if i=='O':
# # #         o+=1
# # # if a%2==0 and o%2!=0:
# # #     print('UwU')
# # # else:
# # #     print('Ne UwU')

# # # import random
# # # x=random.randint(1,3)
# # # print(
# # # """введи число от 1 до 3 
# # #     камень-1
# # #     ножницы-2
# # #     бумага-3
# # # """
# # # )
# # # c=int(input())
# # # if c==x:
# # #     if x==1 and c==1:    
# # #         print('                                                         Комп: Камень<<', '>>ты: Камень')
# # #     if x==2 and c==2:    
# # #         print('                                                         Комп: Ножницы<<', '>>ты: Ножницы')
# # #     if x==3 and c==3:    
# # #         print('                                                         Комп: Бумага<<', '>>ты: Бумага')
# # #     print('                                                         Ничья')
# # # if x==1 and c==2 or x==3 and c==1 or x==2 and c==3:
# # #     if x==1 and c==2:    
# # #         print('                                                         Комп: Камень<<', '>>ты: Ножницы')
# # #     if x==3 and c==1:
# # #         print('                                                         Комп: Бумага<<', '>>ты: Камень')  
# # #     if x==2 and c==3: 
# # #         print('                                                         Комп: Ножницы<<', '>>ты: Бумага')      
# # #     print('                                                     Прогрыш')
# # # if c==1 and x==2 or c==3 and x==1 or c==2 and x==3:
# # #     if c==1 and x==2:
# # #         print('                                                         Комп: Ножницы<<', '>>ты: Камень')
# # #     if c==3 and x==1:
# # #         print('                                                         Комп: Камень<<', '>>ты: Бумага')
# # #     if c==2 and x==3:
# # #         print('                                                         Комп: Бумага<<', '>>ты: Ножницы')
# # #     print('                                                     Выйгрыш')

# # # c=0
# # # x=[4,5,3,45,6,53,67,43,42,78]
# # # for i in range(len(x)-1):   
# # #     if x[i]*x[i+1]%3==0:
# # #         c+=1
# # # print(c)

# # # c=0
# # # x=[1,2,3,4,2,4,3,2]
# # # for i in range(len(x)-1):
# # #     if x[i]-x[i-1]-x[i-2]%2==0:
# # #         c+=1
# # #         print(c)

# v=1
# x=int(input())
# c=0
# while c<x:
#     c+=1
#     v*=c 
# print(v)

# # a=int(input())
# # b=int(input())
# # c=int(input())
# # if a+b==c or a+c==b or b+c==a:
# #     print('YES')
# # else:
# #     print('NO')

# a=0
# x=input()
# d=len(x)//2
# for i in x:
#     if i=="a":
#         a+=1
# if a>d:
#     print('Yes')
# else:
#     print("No")

# hl=0
# sl=input()
# for i in sl:
#     if i=='4' or i=='7':
#         hl+=1
# if hl==4 or hl==7:
#     print('Yes')
# else:
#     print('No')

# c=0
# x=input()
# for i in x:
#     i=int(i)
#     if i%2==0:
#         c+=i
# print(c)

# a=int(input())
# b=int(input())
# c=int(input())
# if a==b or c==a or b==c:   
#     if a==b and a==c:
#         print(3)
#     else:
#         print(2)
# else:
#     print(0)

# o=0
# x=[7,500,60,120,65,90]
# x=str(x)
# for i in x:
#     if i=='0':
#         o+=1
# print(o)

# v=0
# x=0
# while x<1000:
#     if x%3==0:   
#       print(v)
#     v+=x
#     x+=1

# o=0
# l=0      
# x=input()
# for i in x:
#     if i=='0':
#         o+=1
#     elif i=='1':
#         l+=1
# print('0', o)
# print('1', l)

# v=1
# x=int(input())
# c=0
# while c<x:
#     c+=1
#     v*=c 
# print(v)

# x=input()
# s={}
# q=0
# for i in x:
#     if i not in s:
#         s[i]=0
#     s[i]+=1
# max=0
# name=""
# for i in s:
#     if max<s[i]:
#         max=s[i]
#         name=i
# print(name, 'Встречается', max, "раз")

# t=int(input())
# for i in range(t):
#     # a,b,c=[int(i) for i in input().split(" ")]
#     # if a+b==c or a+c==b or c+b==a:
#     #     print("YES")
#     # else:
#     #     print("NO")

# s=int(input())
# for i in range(s):
#     a,b,c,d=[int(i) for i in input().split(" ")]
#     w=[b,c,d]
#     count=0
#     for j in w:
#         if a<j:
#             count+=1
#     print(count)

# x=0
# t=int(input())
# for i in range(t):
#     s=input()
#     if s=="Tetrahedron":
#         x+=4
#     if s=='Cube':
#         x+=6
#     if s=='Octahedron':
#         x+=8
#     if s=='Dodecahedron':
#         x+=12
#     if s=='Icosahedron':
#         x+=20
# print(x)  

n = input()[::-1]
rn=input()
if n==rn:
    print('YES')
else:
    print('NO')