<reponame>dimitrov-dimitar/competitive-programming
# https://codeforces.com/problemset/problem/41/A

s = input()
t = input()

if s == t[::-1]:
    print('YES')
else:
    print('NO')

# https://codeforces.com/problemset/problem/41/A

s = input()
t = input()

if s == t[::-1]:
    print('YES')
else:
    print('NO')
# https://codeforces.com/problemset/problem/41/A