E. a less than b
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Given two strings $$$a$$$ and $$$b$$$, each of length $$$n$$$.

You can make this operation at most once:

Choose two integers $$$l$$$ and $$$r$$$ such that $$$(1 \le l \le r \le n)$$$ and reverse the substring from $$$l$$$ to $$$r$$$ of the string $$$a$$$.

Your task is to tell whether it is possible to make string $$$a$$$ lexicographically smaller than string $$$b$$$.

Input

The first line of the input contains a single positive integer $$$t$$$ $$$(1 \le t \le 10^5)$$$, the number of test cases.

The first line of each test case contains a single integer $$$n$$$ $$$(1 \le n \le 10^5)$$$, the length of strings $$$a$$$ and $$$b$$$.

The second line of each test case contains the string $$$a$$$ of length $$$n$$$.

The third line of each test case contains the string $$$b$$$ of length $$$n$$$.

Strings $$$a$$$ and $$$b$$$ contain only lowercase Latin letters.

It is guaranteed that the sum of $$$n$$$ overall test cases doesn't exceed $$$10^5$$$.

Output

For each test case, print $$$\bf{Yes}$$$ if you can make string $$$a$$$ lexicographically smaller than string $$$b$$$ using at most one operation; otherwise, print $$$\bf{No}$$$.You may print each character in either case, for example $$$\bf{YES}$$$ and $$$\bf{yEs}$$$ will also be accepted.

Example
Input
6
2
za
za
3
abb
abb
4
abza
aaza
3
bad
abd
3
bba
abd
6
cbadca
abcdcb
Output
Yes
No
No
No
Yes
Yes