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.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
 
public class Main {
	static final int INF = (int) (1e9 + 10);
	static final int MOD = (int) (1e9 + 7);
 
	// static final int N = (int) (4e5 + 5);
	// static ArrayList<Integer>[] graph;
	// static boolean visited[];
	// static long size[];
 
	public static void main(String[] args) throws NumberFormatException, IOException {
		FastReader sc = new FastReader();
		PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int tk = sc.nextInt();
		for(int tt =0 ; tt < tk ; tt++){
		    int n = sc.nextInt();
		    String s = sc.next();
		    String t = sc.next();
		    int m =0;
		  //  for(int i = 0 ; i < n ; i++){
		  //      a[i] = sc.nextInt();
		  //    //  m = Math.max(m ,  a[i]);
		  //  }
		    int sum =0;
		    int p=0;
		    boolean so = false;
		    int [] c = new int [n];
		    char [] sa = new char[2];
		    char [] ta = new char[2];
		    for(int i =0 ; i < n ; i++){
		        if(s.charAt(i) == t.charAt(i)){
		            c[i] =0;
		        }else{
		            if(p >= 2){
		                so = true;
		                break;
		            }
		            sa[p] = s.charAt(i);
		            ta[p] = t.charAt(i);
		            c[i] = 1;
		            p++;
		        }
		        sum += c[i];
		    }
		    if(so){
		        pr.println("No");
		        continue;
		    }
		    if(sum == 0 ){
		        pr.println("Yes");
		    }else{
		        if(sum > 2){
		            pr.println("No");
		        }else{
		            if(sa[0] == sa[1] && ta[0] == ta[1]){
		                pr.println("Yes");
		            }else{
		                pr.println("No");
		            }
		        }
		    }
		    
		}
		
		pr.flush();
		pr.close();
	}
 
	/*
	 * Template From Here
	 */
	private static boolean possible(long[] arr, int[] f, long mid, long k) {
		long c = 0;
 
		for (int i = 0; i < arr.length; i++) {
			if ((arr[i] * f[f.length - i - 1]) > mid) {
				c += (arr[i] - (mid / f[f.length - i - 1]));
			}
		}
		// System.out.println(mid+" "+c);
		if (c <= k)
			return true;
		return false;
	}
 
	public static int lowerBound(ArrayList<Integer> array, int length, long value) {
		int low = 0;
		int high = length;
		while (low < high) {
			final int mid = (low + high) / 2;
			if (value <= array.get(mid)) {
				high = mid;
			} else {
				low = mid + 1;
			}
		}
		return low;
	}
 
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
 
	static long gcd(long a, long b) {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}
 
	static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	}
 
	public static void sortbyColumn(int[][] att, int col) {
		// Using built-in sort function Arrays.sort
		Arrays.sort(att, new Comparator<int[]>() {
 
			@Override
			// Compare values according to columns
			public int compare(final int[] entry1, final int[] entry2) {
 
				// To sort in descending order revert
				// the '>' Operator
				// if (entry1[col] > entry2[col])
				// return 1;
				// else //(entry1[col] >= entry2[col])
				// return -1;
				return new Integer(entry1[col]).compareTo(entry2[col]);
				// return entry1[col].
			}
		}); // End of function call sort().
	}
 
	static class pair {
		int V, I;
 
		pair(int v, int i) {
			V = v;
			I = i;
		}
	}
 
	public static int[] swap(int data[], int left, int right) {
		int temp = data[left];
		data[left] = data[right];
		data[right] = temp;
		return data;
	}
 
	public static int[] reverse(int data[], int left, int right) {
		while (left < right) {
			int temp = data[left];
			data[left++] = data[right];
			data[right--] = temp;
		}
		return data;
	}
 
	public static boolean findNextPermutation(int data[]) {
		if (data.length <= 1)
			return false;
 
		int last = data.length - 2;
		while (last >= 0) {
			if (data[last] < data[last + 1]) {
				break;
			}
			last--;
		}
		if (last < 0)
			return false;
 
		int nextGreater = data.length - 1;
		for (int i = data.length - 1; i > last; i--) {
			if (data[i] > data[last]) {
				nextGreater = i;
				break;
			}
		}
		data = swap(data, nextGreater, last);
		data = reverse(data, last + 1, data.length - 1);
		return true;
	}
 
	static long nCr(long n, long r) {
		if (n == r)
			return 1;
		return fact(n) / (fact(r) * fact(n - r));
	}
 
	static long fact(long n) {
		long res = 1;
		for (long i = 2; i <= n; i++)
			res = res * i;
		return res;
	}
 
	/*
	 * static boolean prime[] = new boolean[1000007];
	 * 
	 * public static void sieveOfEratosthenes(int n) {
	 * 
	 * for (int i = 0; i < n; i++) prime[i] = true; * for (int p = 2; p * p <=
	 * n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]
	 * == true) { // Update all multiples of p for (int i = p * p; i <= n; i +=
	 * p) prime[i] = false; } }
	 * 
	 * // Print all prime numbers // for(int i = 2; i <= n; i++) // { //
	 * if(prime[i] == true) // System.out.print(i + " "); // } }
	 */
 
	static long power(long fac2, int y, int p) {
		long res = 1;
		fac2 = fac2 % p;
		while (y > 0) {
			if (y % 2 == 1)
				res = (res * fac2) % p;
			fac2 = (fac2 * fac2) % p;
		}
		return res;
	}
 
	static long modInverse(long fac2, int p) {
		return power(fac2, p - 2, p);
	}
 
	static boolean isPrime(int n) {
		// Corner cases
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;
 
		// This is checked so that we can skip
		// middle five numbers in below loop
		if (n % 2 == 0 || n % 3 == 0)
			return false;
 
		for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;
 
		return true;
	}
 
	public static BigInteger lcmm(String a, String b) {
		BigInteger s = new BigInteger(a);
		BigInteger s1 = new BigInteger(b);
		BigInteger mul = s.multiply(s1);
		BigInteger gcd = s.gcd(s1);
		BigInteger lcm = mul.divide(gcd);
		return lcm;
	}
 
}
 