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.
class input_t:
  t = ""
  s = ""

class output_t:
  pass


def test_input():
    f = input_t()
    import random
    t = random.randint(1,10)
    for i in range(t):
        word =  chr(random.randint(ord('a'), ord('z')))
        f.s+= word
    return f

def read_input():
  f = input_t
  f.s = input()
  f.s = f.s[::-1]
  f.t = input()
  return  f

def solve(in_data):
  g = in_data
  if g.s == g.t :
      print('YES')
  else:
      print('NO')




def write_output(out_data):
  pass

def main():
  #in_data = test_input()
  #print("in_data:", in_data)
  in_data = read_input()
  #print("in_data:", in_data)
  out_data = solve(in_data)
  #print("out_data:", out_data)
  #write_output(out_data)

if __name__ == "__main__":
  main()