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.
//  package com.company;
 import java.util.*;
 import java.io.*;
 import java.lang.*;

 public class Main{
     /*
      ** || ॐ श्री गणेशाय नमः ||
      ** @𝙖𝙪𝙩𝙝𝙤𝙧 𝙅𝙞𝙜𝙖𝙧_𝙉𝙖𝙞𝙣𝙪𝙟𝙞
      ** 𝙎𝙑𝙉𝙄𝙏-𝙎𝙐𝙍𝘼𝙏
      */
     public static void main(String args[]){
         PrintWriter out=new PrintWriter(System.out);
         InputReader in=new InputReader(System.in);
         TASK solver = new TASK();
         int t = in.nextInt();
//        int t=1;
         for(int i=0;i<t;i++)
         {
             solver.solve(in,out,i);
         }
         out.close();
     }
     static class TASK {
         static int mod = 998244353;
         void solve(InputReader in, PrintWriter out, int testNumber) {
          int n = in.nextInt();
          char[] s = in.next().toCharArray();
          char[] t = in.next().toCharArray();
          int a1[] = new int[26];
          int a2[] = new int[26];
          for(int i=0;i<n;i++)
          {
              a1[s[i]-'a']++;
              a2[t[i]-'a']++;
          }
          for(int i=0;i<26;i++)
          {
              if((a1[i]+a2[i])%2!=0)
              {
                  System.out.println("NO");
                  return;
              }
          }
          ArrayList<pair> al = new ArrayList<>();
          for(int i=0;i<n;i++)
          {
              if(s[i]==t[i])
              {
                  a1[s[i]-'a']--;
                  continue;
              }
              if(s[i]!=t[i])
              {
                  if(a1[s[i]-'a']-1>0) {
                      int x=0;
                      for (int j = i + 1; j < n; j++) {
                            if(s[j]==s[i])
                            {
                                x=j;
                                break;
                            }
                      }
                      char xx = t[i];
                      t[i]=s[x];
                      s[x]=xx;
                      a1[xx-'a']++;
                      a1[t[i]-'a']--;
                      al.add(new pair(x+1,i+1));
                  }
                  else
                  {
                      int x=0;
                      for (int j = i + 1; j < n; j++) {
                          if(t[j]==s[i])
                          {
                              x=j;
                              break;
                          }
                      }
                      al.add(new pair(x+1,x+1));
                      a1[t[i]-'a']++;
                      a1[s[x]-'a']--;
                      char xx = t[x];
                      t[x]=s[x];
                      s[x]=xx;
                      xx = t[i];
                      t[i]=s[x];
                      s[x]=xx;
                      al.add(new pair(x+1,i+1));
                  }
              }
              a1[s[i]-'a']--;
          }
          if(al.size()<=2*n)
          {
              System.out.println("YES");
              System.out.println(al.size());
              for(int i=0;i<al.size();i++)
                  System.out.println(al.get(i).x+" "+al.get(i).y);
          }
          else
              System.out.println("NO");



         }
     }

     static class pair{
         int x;
         int y;
         pair(int x,int y)
         {
             this.x=x;
             this.y=y;
         }

     }
     static class Maths{
         static long gcd(long a, long b) {
             if (a == 0)
                 return b;
             return gcd(b % a, a);
         }

         public  static long lcm(long a, long b)
         {
             return (a*b)/gcd(a, b);
         }

         public static long factorial(int n){
             long fact = 1;
             for(int i=1;i<=n;i++){
                 fact *= i;
             }
             return fact;
         }
     }


     static class InputReader {
         private InputStream stream;
         private byte[] buf = new byte[1024];
         private int curChar;
         private int numChars;
         private SpaceCharFilter filter;

         public InputReader(InputStream stream) {
             this.stream = stream;
         }

         public int read() {
             if (numChars == -1)
                 throw new InputMismatchException();

             if (curChar >= numChars) {
                 curChar = 0;
                 try {
                     numChars = stream.read(buf);
                 } catch (IOException e) {
                     throw new InputMismatchException();
                 }

                 if (numChars <= 0)
                     return -1;
             }
             return buf[curChar++];
         }

         public String nextLine() {
             BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
             String str = "";
             try {
                 str = br.readLine();
             } catch (IOException e) {
                 e.printStackTrace();
             }
             return str;
         }

         public int nextInt() {
             int c = read();

             while (isSpaceChar(c))
                 c = read();

             int sgn = 1;

             if (c == '-') {
                 sgn = -1;
                 c = read();
             }

             int res = 0;
             do {
                 if (c < '0' || c > '9')
                     throw new InputMismatchException();
                 res *= 10;
                 res += c - '0';
                 c = read();
             }
             while (!isSpaceChar(c));

             return res * sgn;
         }

         public long nextLong() {
             int c = read();
             while (isSpaceChar(c))
                 c = read();
             int sgn = 1;
             if (c == '-') {
                 sgn = -1;
                 c = read();
             }
             long res = 0;

             do {
                 if (c < '0' || c > '9')
                     throw new InputMismatchException();
                 res *= 10;
                 res += c - '0';
                 c = read();
             }
             while (!isSpaceChar(c));
             return res * sgn;
         }

         public double nextDouble() {
             int c = read();
             while (isSpaceChar(c))
                 c = read();
             int sgn = 1;
             if (c == '-') {
                 sgn = -1;
                 c = read();
             }
             double res = 0;
             while (!isSpaceChar(c) && c != '.') {
                 if (c == 'e' || c == 'E')
                     return res * Math.pow(10, nextInt());
                 if (c < '0' || c > '9')
                     throw new InputMismatchException();
                 res *= 10;
                 res += c - '0';
                 c = read();
             }
             if (c == '.') {
                 c = read();
                 double m = 1;
                 while (!isSpaceChar(c)) {
                     if (c == 'e' || c == 'E')
                         return res * Math.pow(10, nextInt());
                     if (c < '0' || c > '9')
                         throw new InputMismatchException();
                     m /= 10;
                     res += (c - '0') * m;
                     c = read();
                 }
             }
             return res * sgn;
         }

         public String readString() {
             int c = read();
             while (isSpaceChar(c))
                 c = read();
             StringBuilder res = new StringBuilder();
             do {
                 res.appendCodePoint(c);
                 c = read();
             }
             while (!isSpaceChar(c));

             return res.toString();
         }

         public boolean isSpaceChar(int c) {
             if (filter != null)
                 return filter.isSpaceChar(c);
             return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
         }

         public String next() {
             return readString();
         }

         public interface SpaceCharFilter {
             public boolean isSpaceChar(int ch);
         }
     }
 }
