P12846 [HackerEarth] chotu and palindromic strings
普及
题目描述

Everyone knows that chotu likes palindromic strings. One day, he found 2 ordinary strings s1 and s2. Now he wonders if he could make a palindrome by concatenating s1 and s2 in any order. i.e if s1s2 or s2s1 is a palindrome.

Input

First line of input contains T, denoting number of test cases.
Each test case contains two lines, first line contains string s1 and second line contains string s2.
Output
Print T lines, either "YES" or "NO"(without quotes).

Constrains
1 ≤ T ≤ 1000
1 ≤ |s1|, |s2| ≤ 10000
Both strings contain only lower case letters.

SAMPLE INPUT
2
aba
baba
xy
zw

SAMPLE OUTPUT
YES
NO

输入格式

见题面

输出格式

见题面

样例输入
2 aba baba xy zw SAMPLE
样例输出
YES NO