This problem is different from the hard version. In this version Ujan makes exactly one exchange. You can hack this problem only if you solve both problems.

After struggling and failing many times, Ujan decided to try to clean up his house again. He decided to get his strings in order first.

Ujan has two distinct strings $s$ and $t$ of length $n$ consisting of only of lowercase English characters. He wants to make them equal. Since Ujan is lazy, he will perform the following operation exactly once: he takes two positions $i$ and $j$ ($1 \le i,j \le n$, the values $i$ and $j$ can be equal or different), and swaps the characters $s_i$ and $t_j$. Can he succeed?

Note that he has to perform this operation exactly once. He has to perform this operation.


-----Input-----

The first line contains a single integer $k$ ($1 \leq k \leq 10$), the number of test cases.

For each of the test cases, the first line contains a single integer $n$ ($2 \leq n \leq 10^4$), the length of the strings $s$ and $t$. 

Each of the next two lines contains the strings $s$ and $t$, each having length exactly $n$. The strings consist only of lowercase English letters. It is guaranteed that strings are different.


-----Output-----

For each test case, output "Yes" if Ujan can make the two strings equal and "No" otherwise.

You can print each letter in any case (upper or lower).


-----Example-----
Input
4
5
souse
houhe
3
cat
dog
2
aa
az
3
abc
bca

Output
Yes
No
No
No



-----Note-----

In the first test case, Ujan can swap characters $s_1$ and $t_4$, obtaining the word "house".

In the second test case, it is not possible to make the strings equal using exactly one swap of $s_i$ and $t_j$.

Difficulty: interview

Starter code:

Solutions:
k = int(input())
for i in range(k):
    n = int(input())
    s1 = input()
    s2 = input()
    q = None
    for i in range(n):
        if s1[i] != s2[i]:
            if q is None:
                q = s1[i], s2[i]
            elif q == (s1[i], s2[i]):
                q = 1
            else:
                print('No')
                break
    else:
        if q == 1:
            print('Yes')#isinstance(q, tuple):
        else:
            print('No')

q = int(input())
for _ in range(q):
    n = int(input())
    s = input()
    t = input()
    cnt = 0
    tmp = []
    for i in range(n):
        if s[i] != t[i]:
            cnt += 1
            tmp.append(i)
    if cnt == 0:
        print("Yes")
    elif cnt == 1:
        print("No")
    elif cnt == 2:
        if s[tmp[0]] == s[tmp[1]] and t[tmp[0]] == t[tmp[1]]:
            print("Yes")
        else:
            print("No")
    else:
        print("No")

n = int(input())
for i in range(n):
    k = int(input())
    cnt = 0
    bad = []
    s = input()
    t = input()
    for i in range(k):
        if s[i] != t[i]:
            cnt += 1
            bad.append(i)
    if cnt != 2:
        print("No")
    else:
        if s[bad[0]] != s[bad[1]] or t[bad[0]] != t[bad[1]]:
            print("No")
        else:
            print("Yes")

k = int(input())

for _ in range(k):
	n = int(input())

	A = input()
	B = input()

	X = []

	for i in range(n):
		if A[i] != B[i]:
			X.append(i)

	if len(X) == 0:
		print("Yes")

	elif len(X) == 2:
		x, y = X

		if A[x] == A[y] and B[y] == B[x]:
			print("Yes")
		else:
			print("No")

	else:
		print("No")


for i in ' '*int(input()):
    n=int(input())
    s=input()
    t=input()
    counter=0
    L=[]
    for j in range(n):
        if s[j]!=t[j]:
            counter+=1
            L.append(j)
    if counter!=0 and counter!=2:
        print("No")
        continue
    else:
        if counter==0:
            print("Yes")
        else:
            a,b=L
            if s[a]==s[b]and t[a]==t[b]:print("Yes")
            else: print("No")
        continue

for TT in range(1, int(input()) + 1):
    n = int(input())
    a = input()
    b = input()
    l = [[x, y] for x, y in zip(a, b) if x != y]
    res = len(l) == 0
    if len(l) == 2: res = l[0] == l[1]
    print("Yes" if res else "No")

k=int(input())
for nt in range(k):
	n=int(input())
	s=input()
	t=input()
	diff=0
	same=0
	d=[]
	for i in range(n):
		if s[i]==t[i]:
			same+=1
		else:
			diff+=1
			d.append([s[i],t[i]])
	if diff>2:
		print ("No")
	elif diff==1:
		print ("No")
	elif diff==0:
		print ("Yes")
	else:
		if d[0][0]==d[1][0] and d[0][1]==d[1][1]:
			print ("Yes")
		else:
			print ("No")


K = int(input())
for _ in range(K):
    N = int(input())
    S = input()
    T = input()
    diff = []
    for c1, c2 in zip(S, T):
        if c1!=c2:
            diff.append((c1, c2))
    f = False
    if len(diff)==2:
        (a, b), (c, d) = diff
        if a==c and b==d:
            f = True
    print("Yes" if f else "No")


for _ in range(int(input())):
    n = int(input())
    s = input()
    t = input()
    x = []
    for i in range(n):
        if s[i]!=t[i]:
            x.append(i)
    if len(x)!=2:
        print('No')
    else:
        if s[x[0]]==s[x[1]] and t[x[0]]==t[x[1]]:
            print('Yes')
        else:
            print('No')

for _ in range(int(input())):
	n = int(input())
	s, t = input(), input()
	i, j, ans = -1, -1, 0
	for k in range(n):
		if s[k] != t[k]:
			if ans:
				j = k
			else:
				i = k
			ans += 1
	if ans == 2 and (t[i] == t[j] and s[j] == s[i]):
		print("Yes")
	else:
		print("No")


for i in range(int(input())):
    n=int(input())
    s=input()
    t=input()
    count=0
    s1=[]
    t1=[]
    for j in range(n):
        if s[j]!=t[j]:
            count+=1
            s1.append(s[j])
            t1.append(t[j])
    if count==2 and s1[0]==s1[1] and t1[0]==t1[1]:
        print("Yes")
    else:
        print("No")


k = int(input())
for da in range(k):
    n = int(input())
    s1 = input()
    s2 = input()
    a = []
    for i in range(n):
        if s1[i] != s2[i]:
            a.append(i)
    if len(a) == 0:
        print("Yes")
        continue
    if len(a) != 2:
        print("No")
        continue
    if s1[a[0]]==s1[a[1]] and s2[a[0]]==s2[a[1]]:
        print("Yes")
    else:
        print("No")


for _ in range(int(input())):
    n = int(input())
    s = list(input())
    t = list(input())

    l = []

    for i in range(n):
        if s[i] != t[i]:
            l.append(i)

    if len(l) != 2:
        print('No')
    else:
        s[l[0]], t[l[1]] = t[l[1]], s[l[0]]

        if s == t:
            print('Yes')
        else:
            print('No')

T = int(input())
for t in range(T):
    n = int(input())
    s1 = list(input())
    s2 = list(input())

    ct = 0
    idx = []
    for i in range(n):
        if s1[i] != s2[i]:
            ct += 1
            idx.append(i)

    
    if ct == 2:
        s1[idx[0]], s2[idx[1]] = s2[idx[1]], s1[idx[0]]
        if s1 == s2:
            print('Yes')
        else:
            print('No')
    else:
        print('No')


def mi():
        return list(map(int, input().split()))
'''
4
5
souse
houhe
3
cat
dog
2
aa
az
3
abc
bca
'''
for _ in range(int(input())):
    n = int(input())
    a = list(input())
    b = list(input())
    ndiff = 0
    aa,bb=[0]*2,[0]*2

    for i in range(n):
        if a[i]!=b[i]:
            ndiff+=1
            if ndiff==3:
                break
            aa[ndiff-1]=a[i]
            bb[ndiff-1]=b[i]
    if ndiff==1 or ndiff>2:
        print('No')
    else:
        #print(aa,bb)
        if ndiff==2:
            if aa[0]!=aa[1] or bb[1]!=bb[0]:
                print('No')
                continue
        print('Yes')


t = int(input())
while t>0:
    n = int(input())
    
    a = input()
    b = input()
    ind = []
    for i in range(0,len(a)):
        if a[i] == b[i]:
            pass
        else:
            ind.append(i)
    if len(ind)>2 or len(ind)==1:
        print('No')
    else:
        if a[ind[0]] == a[ind[1]] and b[ind[0]] == b[ind[1]]:
            print('Yes')
        else:
            print('No')
    t-=1

for _ in range(int(input())):
    n = int(input())
    s = input()
    t = input()

    d = []
    for i in range(n):
        if s[i] != t[i]:
            d.append(i)

    if len(d) != 2:
        print("No")
    else:
        i, j = d
        if s[i] == s[j] and t[i] == t[j]:
            print("Yes")
        else:
            print("No")

for _ in range(int(input())):
    n=int(input())
    s1=input()
    s2=input()
    same=False
    possible=True
    l=[]
    for i in range(n):
        if s1[i]!=s2[i]:
            l.append([s1[i],s2[i]])
        else:
            same=True
   # print(l)
    if len(l)==0 and same:
        print("Yes")
    elif len(l)==2 and l[0][0]==l[1][0] and l[0][1]==l[1][1]:
        print("Yes")
    else:
        print("No")

import re

for _ in range(int(input())):
    n = int(input())
    a = input()
    b = input()
    difa = []
    difb = []
    diffS = 0
    for i in range(0,n):
        if(a[i] == b[i]):
            continue
        difa += [a[i]]
        difb += [b[i]]
        diffS +=1
        if(diffS>2):
            break
    if(diffS<2 or diffS>2):
        print("No")
    elif(difa[0]==difa[1] and difb[0] == difb[1] and diffS==2):
        print("Yes")
    else:
        print("No")

def solve(s, t):
    count = 0
    a = []
    b = []
    for i in range(len(s)):
        if s[i] != t[i]:
            count += 1
            a.append(s[i])
            b.append(t[i])
    if count == 0:
        return 'Yes'
    if count != 2:
        return 'No'
    if a[0] == a[1] and b[0] == b[1]:
        return 'Yes'
    return 'No'
    
k = int(input())

for t in range(k):
    n = int(input())
    s = input()
    t = input()
    print(solve(s, t))


k=int(input())
for i in range(k):
    l=int(input())
    s=input()
    t=input()
    d=0
    sl=[]
    tl=[]
    for j in range(l):
        if s[j]!=t[j]:
            d+=1
            sl.append(s[j])
            tl.append(t[j])
    if d==0 or (d==2 and sl[0]==sl[1] and tl[0]==tl[1]):
        print("Yes")
    else:
        print("No")