Problem: Ashish has two strings a and b, each of length n, and an integer k. The strings only contain lowercase English letters.

He wants to convert string a into string b by performing some (possibly zero) operations on a.

In one move, he can either 

  * choose an index i (1 ≤ i≤ n-1) and swap a_i and a_{i+1}, or 
  * choose an index i (1 ≤ i ≤ n-k+1) and if a_i, a_{i+1}, …, a_{i+k-1} are all equal to some character c (c ≠ 'z'), replace each one with the next character (c+1), that is, 'a' is replaced by 'b', 'b' is replaced by 'c' and so on. 



Note that he can perform any number of operations, and the operations can only be performed on string a. 

Help Ashish determine if it is possible to convert string a into b after performing some (possibly zero) operations on it.

Input

The first line contains a single integer t (1 ≤ t ≤ 10^5) — the number of test cases. The description of each test case is as follows.

The first line of each test case contains two integers n (2 ≤ n ≤ 10^6) and k (1 ≤ k ≤ n).

The second line of each test case contains the string a of length n consisting of lowercase English letters.

The third line of each test case contains the string b of length n consisting of lowercase English letters.

It is guaranteed that the sum of values n among all test cases does not exceed 10^6.

Output

For each test case, print "Yes" if Ashish can convert a into b after some moves, else print "No".

You may print the letters of the answer in any case (upper or lower).

Example

Input


4
3 3
abc
bcd
4 2
abba
azza
2 1
zz
aa
6 2
aaabba
ddddcc


Output


No
Yes
No
Yes

Note

In the first test case it can be shown that it is impossible to convert a into b.

In the second test case,

"abba" \xrightarrow{inc} "acca" \xrightarrow{inc} … \xrightarrow{inc} "azza".

Here "swap" denotes an operation of the first type, and "inc" denotes an operation of the second type.

In the fourth test case,

"aaabba" \xrightarrow{swap} "aaabab" \xrightarrow{swap} "aaaabb" \xrightarrow{inc} … \xrightarrow{inc} "ddaabb" \xrightarrow{inc} … \xrightarrow{inc} "ddddbb" \xrightarrow{inc} … \xrightarrow{inc} "ddddcc".

Solution (in JAVA):

Solution:
//note: 0<=|int|<= 2 * 10^9
//note: 0<=|long|<= 9 * 10^18
//note: 20! max w/ long
//note: 91st fibonacci # highest calculable w/long
//note: 0 <= |double| <= 1.8 * 10^308
//note: 170! max w/double;
//java machine can make 10^8 computations in a second.
import java.io.*;
import java.util.*;
import java.util.Set;
import java.util.HashSet;
import java.util.ArrayList;
    
public class CP{
    static int MAX = Integer.MAX_VALUE, MIN = Integer.MIN_VALUE;
    static FastScanner sc = new FastScanner();
    static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
    static boolean bestAnsFound = false;
    static int visits = 0;
    public static void main(String[] args){
    	solve();	
        out.close();
    }
    
    static void solve() {
    	int t = sc.nextint();
    	while(t-->0) {
    		int n = sc.nextint(), k = sc.nextint();
    		String a = sc.next(), b = sc.next();
    		int[] cA = new int[26], cB = new int[26];
    		for(char c : a.toCharArray()) {
    			cA[c-'a']++;
    		}
    		for(char c : b.toCharArray()) {
    			cB[c-'a']++;
    		}
    		
    		boolean ok = true;
    		for(int i = 25; i >= 0; --i) {
    			if(cA[i] > cB[i] || (cB[i]-cA[i])%k != 0) {
    				ok = false;
    				break;
    			}
    			for(int j = i-1; j >= 0 && cA[i]<cB[i]; --j) {
    				while(cA[j] >= k && cA[i] < cB[i]) {
    					cA[i] += k;
    					cA[j] -= k;
    				}
    			}
    		}
    		
    		out.println(ok?"Yes":"No");
    	}
    }
    
    static class Node{
        int id;
        Set<Edge> adj = new HashSet<Edge>();
        public Node(int id) {
            this.id = id;
        }
        void add(Edge e) {
        	adj.add(e);
        }
    }
    
    static class Edge{
    	public Node from, to;
    	public Edge residual;
    	public int flow, capacity;
    	public Edge(Node from, Node to, int capacity) {
    		this.from = from;
    		this.to = to;
    		this.capacity = capacity;
    	}
    	
    	public int remainingCapacity() {
    		return capacity-flow;
    	}
    	
    	public void augment(int bottleNeck) {
    		flow += bottleNeck;
    		residual.flow -= bottleNeck;
    	}
    }
    
    static class UnionFind{
        public int numComponents;
        public int[] sz, id;
        public UnionFind(int size) {
            numComponents = size;
            sz = new int[size];
            id = new int[size];
            for(int i = 0; i < size; ++i) {
                id[i] = i;
                sz[i] = 1;
            }
        }
        
        public int find(int p) {
            int root = p;
            while(root != id[root]) {
                root = id[root];
            }
            while(p != root) {
                int next = id[p];
                id[p] = root;
                p = next;
            }
            return root;
        }
        
        public void unify(int p, int q) {
            int root1 = find(p);
            int root2 = find(q);
            
            if(root1 == root2) {
                return;
            }
            
            if(sz[root1] < sz[root2]) {
                sz[root2] += sz[root1];
                id[root1] = id[root2];
            }
            else {
                sz[root1] += sz[root2];
                id[root2] = id[root1];
            }
                
            --numComponents;
        }
    }
    
    static class RMQ{
        int leftMost, rightMost, min, max;
        RMQ lChild, rChild;
        public RMQ(int lb, int rb, int[] a) {
            leftMost = lb;
            rightMost = rb;
            if(lb == rb) {
                min = max = a[lb];
                return;
            }
            int mb = (lb+rb)/2;
            lChild = new RMQ(lb, mb, a); 
            rChild = new RMQ(mb+1, rb, a);
            min = Math.min(lChild.min, rChild.min); 
            max = Math.max(lChild.max, rChild.max);
        }
        
        public void pointUpdate(int index, int val) {
            if(leftMost == rightMost) {
                min = val;
                max = val;
                return;
            }
            if(index <= lChild.rightMost) {
                lChild.pointUpdate(index, val);
            }
            else {
                rChild.pointUpdate(index, val);;
            }
            min = Math.min(lChild.min, rChild.min);
            max = Math.max(lChild.max, rChild.max);
        }
        
        public int rangeMin(int lb, int rb) {
            if(rightMost < lb || leftMost > rb) {
                return Integer.MAX_VALUE;
            }
            else if(rightMost <= rb && leftMost >= lb) {
                return min;
            }
            return Math.min(lChild.rangeMin(lb, rb), rChild.rangeMin(lb,rb));
        }
        
        public int rangeMax(int lb, int rb) {
            if(rightMost < lb || leftMost > rb) {
                return Integer.MIN_VALUE;
            }
            else if(rightMost <= rb && leftMost >= lb) {
                return max;
            }
            return Math.max(lChild.rangeMax(lb, rb), rChild.rangeMax(lb,rb));
        }
    }
    
    static class SegTree{
        int lb, rb;
        int sum;
        SegTree lChild, rChild;
        
        public SegTree(int lb, int rb, int[] a) {
            this.lb = lb;
            this.rb = rb;
            if(lb==rb) {
                sum = a[lb];
                return;
            }
            int mb = (lb+rb)/2;
            lChild = new SegTree(lb, mb, a);
            rChild = new SegTree(mb+1, rb, a);
            recalc();   
        }
        
        public void recalc() {
            if(lb == rb) {
                return;
            }
            sum = lChild.sum + rChild.sum;
        }
        
        public void pointUpdate(int index, int val) {
            if(lb == rb) {
                sum = val;
                return;
            }
            if(index <= lChild.rb) {
                lChild.pointUpdate(index, val);
            }
            else {
                rChild.pointUpdate(index, val);
            }
            recalc();
        }
        
        public long rangeSum(int l, int r) {
            if(l <= lb && rb <= r) {
                return sum;
            }
            if(l > rb || r < lb) {
                return 0;
            }
            return lChild.rangeSum(l, r) + rChild.rangeSum(l, r);
        }
    }
    
    static long modInverse(long a, long b) {
        long bb = b, temp, q;
        long x0 = 0, x1 = 1;
        if(b == 1){
            return 1L;
        }
        while(a > 1){
            q = a/b;
            temp = b; b = a-(a/b)*b; a=temp;
            temp = x0; x0 = x1-q*x0; x1 = temp;
        }
        if(x1 < 0){
            x1 += bb;
        }
        return x1;
    }
    
    static long gcd(long a, long b) {
        if(a == 0) {
            return b;
        }
        return gcd(b%a, a);
    }
    
    static int gcd(int a, int b){
        if(a == 0){
            return b;
        }
        return gcd(b%a, a);
    }
    
    static BufferedReader br;
    static StringTokenizer st;
    
    static class FastScanner{
        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        String next() {
            while(st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        int[] readint(int n) {
            int[] res = new int[n];
            for(int i = 0; i < n; i++) {
                res[i] = nextint();
            }
            return res;
        }
        long[] readlong(int n) {
            long[] res = new long[n];
            for(int i = 0; i < n; i++) {
                res[i] = nextlong();
            }
            return res;
        }
        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;
        }
    }
}