408491: GYM103150 E o
Description
You are given two strings $$$s$$$ and $$$t$$$. An operation consists of the following:
- pick two characters in different positions, replace one of them with o, and replace the other one with any lowercase English letter.
The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases.
The first line of each test case contains a single integer $$$n$$$ ($$$2 \leq n \leq 2000$$$) — the length of $$$s$$$ and $$$t$$$.
The next two lines contain the strings $$$s$$$ and $$$t$$$ of length $$$n$$$, consisting of lowercase English letters. Additional constraint on the input: $$$s \neq t$$$.
OutputFor each test case, output YES if it is possible to turn $$$s$$$ into $$$t$$$ using these operations. Otherwise, output NO. You can print each letter of YES and NO in any case (upper or lower).
ExampleInput2 3 qrs orz 4 ezpc icpcOutput
YES NONote
In the first test case, we can pick the characters q and s in qrs, turn q into o, and turn s into z. The resulting string is orz.
In the second test case, it can be shown that it is impossible to turn $$$s$$$ into $$$t$$$.