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.util.*;
import java.awt.Point;

public class CF_1243B {
    static final String name = "CF_1243B";
    static final boolean test = new File(name + ".in").exists();

    public static void main(String args[]) throws Exception {
        BufferedScanner in = new BufferedScanner(test ? new FileInputStream(name + ".in") : System.in);
        BufferedPrinter out = new BufferedPrinter(test ? new FileOutputStream(name + ".out") : System.out);

        int k = in.nextInt();
        for (int i = 0; i < k; i++) {
            int n = in.nextInt();
            String s = in.next();
            String t = in.next();

            ArrayList<Integer> mis = new ArrayList<>();
            for (int j = 0; j < n; j++) {
                if (s.charAt(j) != t.charAt(j)) mis.add(j);
            }
            if (mis.size() == 0) out.println("Yes");
            else if (mis.size() == 2) {
                int a = mis.get(0);
                int b = mis.get(1);

                if (s.charAt(a) == s.charAt(b) && t.charAt(b) == t.charAt(a)) out.println("Yes");
                else out.println("No");
            } else out.println("No");
        }

        out.close();
        in.close();
    }

    /**
     * My template below. FastIO and utility functions.
     * Minimized with https://codebeautify.org/javaviewer.
     */

    // @formatter:off
    static<T>ArrayList<ArrayList<T>>get2D(int n){ArrayList<ArrayList<T>>ret=new ArrayList<>();for(int i=0;i<n;i++)ret.add(new ArrayList<>());return ret;}
    static void force(boolean condition){if(!condition)throw new IllegalStateException();}
    static void debug(Object obj){if(obj instanceof long[][]){for(long[]a:(long[][])obj)System.out.println(Arrays.toString(a));}
    else if(obj instanceof int[][]){for(int[]a:(int[][])obj)System.out.println(Arrays.toString(a));}
    else if(obj instanceof char[][]){for(char[]a:(char[][])obj)System.out.println(Arrays.toString(a));}
    else if(obj instanceof boolean[][]){for(boolean[]a:(boolean[][])obj)System.out.println(Arrays.toString(a));}
    else if(obj instanceof long[]){System.out.println(Arrays.toString((long[])obj));}
    else if(obj instanceof int[]){System.out.println(Arrays.toString((int[])obj));}
    else if(obj instanceof char[]){System.out.println(Arrays.toString((char[])obj));}
    else if(obj instanceof boolean[]){System.out.println(Arrays.toString((boolean[])obj));}
    else{System.out.println(obj);}}
    static class BufferedPrinter{PrintWriter out;BufferedPrinter(OutputStream out){this(new OutputStreamWriter(out));}
    BufferedPrinter(Writer out){this.out=new PrintWriter(new BufferedWriter(out));}
    void print(Object...os){for(int i=0;i<os.length;i++){if(i!=0)out.print(' ');out.print(os[i]);}}
    void println(Object...os){print(os);out.println();}
    void close(){out.close();}
    void flush(){out.flush();}}
    static class BufferedScanner{private final InputStream in;private final byte[]buf=new byte[1<<13];int pos,count;BufferedScanner(InputStream in)throws IOException{this.in=in;}
    long nextLong()throws IOException{return Long.parseLong(next());}
    int[]nextN(int n)throws IOException{int[]ret=new int[n];for(int i=0;i<n;i++)ret[i]=this.nextInt();return ret;}
    long[]nextNL(int n)throws IOException{long[]ret=new long[n];for(int i=0;i<n;i++)ret[i]=this.nextLong();return ret;}
    private int read(){if(count==-1)err();try{if(pos>=count){pos=0;count=in.read(buf);if(count<=0)return-1;}}catch(IOException e){err();}
    return buf[pos++];}
    private static boolean isSpace(int c){return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;}
    private int readSkipSpace(){int ret;do{ret=read();}while(isSpace(ret));return ret;}
    int nextInt(){int sign=1;int c=readSkipSpace();if(c=='-'){sign=-1;c=read();}
    int ret=0;do{if(c<'0'||c>'9')err();ret=ret*10+c-'0';c=read();}while(!isSpace(c));return sign*ret;}
    String next(){StringBuilder sb=new StringBuilder();int c=readSkipSpace();do{sb.append((char)c);c=read();}while(!isSpace(c));return sb.toString();}
    private void err(){throw new InputMismatchException();}
    void close()throws IOException{in.close();}}
    // @formatter:on
}
