{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eKaran and Arjun were lost in the Kumbh Mela. After very long (15 years) , they have met again but they are unable to recognise each other. So sad ! However Khan Baba who is a renowned for his knowledge comes to Kumbh mela every year and he knows about Karan-Arjun. He is present near Karan-Arjun now, and he asks both of them to check the strings in their pockets. To both of Karan-Arjun\u0027s surprise they find a string in eack of their pockets. The two strings \u003cb\u003eK (Karan\u0027s string)\u003c/b\u003e and \u003cb\u003eA (Arjuns\u0027s string)\u003c/b\u003e, each consist of lower case alphabets.\n\u003c/p\u003e\n\n\u003cp\u003e\nKaran-Arjun would recognise each other if and only if it is possible to choose a \u003cb\u003enon empty\u003c/b\u003e substring from \u003cb\u003eK\u003c/b\u003e, called \u003cb\u003es1\u003c/b\u003e, and a \u003cb\u003enon empty\u003c/b\u003e substring from \u003cb\u003eA\u003c/b\u003e called \u003cb\u003es2\u003c/b\u003e, such that \u003cb\u003es1 + s2\u003c/b\u003e is a palindromic string. Here the \u003cb\u003e\u0027+\u0027\u003c/b\u003e concatenates the two strings s1 and s2.\u003c/p\u003e\n\n\u003cp\u003eA string is a palindromic string if it spells the same both forward as well as backward. For example \"liril\" is a palindromic string.\u003c/p\u003e\n\n\u003ch3\u003eInput\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003eFirst line of input contains a single integer \u003cb\u003eT\u003c/b\u003e denoting the number of test cases.\u003c/li\u003e\n\u003cli\u003eFor each test case:\n\t\u003cul\u003e\n\t\t\u003cli\u003eFirst line contains the string \u003cb\u003eK\u003c/b\u003e\u003c/li\u003e\n\t\t\u003cli\u003eSecond line contains the string \u003cb\u003eA\u003c/b\u003e.\u003c/li\u003e\n\t\u003c/ul\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch3\u003eOutput\u003c/h3\u003e\n\u003cp\u003eFor each test case, you display \u003cb\u003e\"Yes\"\u003c/b\u003e (without quotes) if they recognise each other i.e, it possible to choose such sub-strings \u003cb\u003es1 \u0026 s2\u003c/b\u003e. Display \u003cb\u003e\"No\"\u003c/b\u003e (without quotes) otherwise.\n\n\n\u003ch3\u003eConstraints\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cb\u003e1 ≤ T ≤ 10 \u003c/b\u003e\u003c/li\u003e\n\u003cli\u003e\u003cb\u003e1 ≤ |K|, |A| ≤ 10\u003csup\u003e5\u003c/sup\u003e \u003c/b\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n\n\u003ch3\u003eSample Input\u003c/h3\u003e\n\u003cpre\u003e\n3\nabc\nabc\na\nb\nabba\nbaab\n\u003c/pre\u003e\n\n\u003ch3\u003eSample Output\u003c/h3\u003e\n\u003cpre\u003e\nYes\nNo\nYes\n\u003c/pre\u003e\n\n\u003ch3\u003eExplanation\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cb\u003eTest 1:\u003c/b\u003e One possible way of choosing \u003cb\u003es1 \u0026 s2\u003c/b\u003e is \u003cb\u003es1 \u003d \"ab\"\u003c/b\u003e, \u003cb\u003es2 \u003d \"a\"\u003c/b\u003e such that \u003cb\u003es1 + s2\u003c/b\u003e would be \u003cb\u003e\"aba\"\u003c/b\u003e which is clearly a palindrome.\u003c/li\u003e\n\u003cli\u003e\u003cb\u003eTest 2:\u003c/b\u003e There is no possible way to choose \u003cb\u003es1 \u0026 s2\u003c/b\u003e such that \u003cb\u003es1 + s2\u003c/b\u003e is a palindrome.\u003c/li\u003e"}}]}