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 ≤ i,j ≤ 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 ≤ k ≤ 10), the number of test cases.

For each of the test cases, the first line contains a single integer n (2 ≤ n ≤ 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.
import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;


public class CandidateCode {
    static int mod1 = (int) (1e9 + 7);

    static class Reader {
        final private int BUFFER_SIZE = 1 << 16;
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String nextString() throws IOException {
            String str00 = scan.next();
            return str00;
        }

        public String readLine() throws IOException {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        String next() throws IOException {
            int c;
            for (c = read(); c <= 32; c = read());
            StringBuilder sb = new StringBuilder();
            for (; c > 32; c = read()) {
                sb.append((char) c);
            }
            return sb.toString();
        }

        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null)
                return;
            din.close();
        }

        public int[] nextArray(int n) throws IOException {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }
    }


    static long GCD(long a, long b)
    {
        if (b == 0)
            return a;
        return GCD(b, a % b);
    }


    static boolean primeFactors(long n, int k)
    {
        HashMap<Integer,Integer> hashMap=new HashMap<>();
        int count1=0;
        while (n % 2 == 0)
        {
            n = n/2;
            count1++;
        }
        if(count1>0)
        {
            hashMap.put(2,count1);
            if(count1%k!=0)
            {
                return false;
            }
        }

        for (int i = 3; i <= Math.sqrt(n); i = i + 2)
        {
            int count2=0;
            while (n % i == 0)
            {
                count2++;
                n = n/i;
            }
            if(count2%k!=0)
            {
                return false;
            }
        }

        if (n > 2)
            return false;

        return true;
    }


    public static void main(String[] args) throws IOException
    {
        //Reader r=new Reader();
        Scanner r=new Scanner(System.in);
        OutputWriter770 out=new OutputWriter770(System.out);

        int cas1=r.nextInt();
        me1: while(cas1-->0)
        {
            int len1=r.nextInt();
            String str1=r.next();
            String str2=r.next();
            String ans1="No";
            int[] arr1=new int[26];
            int count1=0;

            int pos1=-1;
            int pos2=-1;
            for(int i=0;i<len1;i++)
            {
                if(str1.charAt(i)!=str2.charAt(i))
                {
                    count1++;
                    if(count1>2)
                    {
                        out.print("No\n");
                        continue me1;
                    }
                    if(pos1==-1)
                    {
                        pos1=i;
                    }
                    else
                    {
                        pos2=i;
                    }
                }
                arr1[str1.charAt(i)-'a']++;
                arr1[str2.charAt(i)-'a']++;
            }
            if(count1==2 || count1==0)
            {
                ans1="Yes";
            }
            if(count1==2)
            {
                if(str1.charAt(pos1)==str1.charAt(pos2) && str2.charAt(pos1)==str2.charAt(pos2))
                {
                    ans1="Yes";
                }
                else
                {
                    ans1="No";
                }
            }
            for(int i=0;i<26;i++)
            {
                if(arr1[i]%2!=0)
                {
                    ans1="No";
                }
            }
            out.print(ans1+"\n");
        }

        out.close();
        r.close();
    }
}

class OutputWriter770
{
    BufferedWriter writer;

    public OutputWriter770(OutputStream stream)
    {
        writer = new BufferedWriter(new OutputStreamWriter(stream));
    }
    public void print(int i) throws IOException
    {
        writer.write(i + "");
    }

    public void println(int i) throws IOException
    {
        writer.write(i + "\n");
    }

    public void print(String s) throws IOException
    {
        writer.write(s + "");
    }

    public void println(String s) throws IOException
    {
        writer.write(s + "\n");
    }

    public void print(char[] c) throws IOException
    {
        writer.write(c);
    }

    public void close() throws IOException
    {
        writer.flush();
        writer.close();
    }
}



class Node
{
    int dest;
    long dist;
    Node(int dest, long dist)
    {
        this.dest=dest;
        this.dist=dist;
    }
}