This is the easy version of the problem. The only difference is that in this version k = 0.

There is an array a_1, a_2, …, a_n of n positive integers. You should divide it into a minimal number of continuous segments, such that in each segment there are no two numbers (on different positions), whose product is a perfect square.

Moreover, it is allowed to do at most k such operations before the division: choose a number in the array and change its value to any positive integer. But in this version k = 0, so it is not important.

What is the minimum number of continuous segments you should use if you will make changes optimally?

Input

The first line contains a single integer t (1 ≤ t ≤ 1000) — the number of test cases.

The first line of each test case contains two integers n, k (1 ≤ n ≤ 2 ⋅ 10^5, k = 0).

The second line of each test case contains n integers a_1, a_2, …, a_n (1 ≤ a_i ≤ 10^7).

It's guaranteed that the sum of n over all test cases does not exceed 2 ⋅ 10^5.

Output

For each test case print a single integer — the answer to the problem.

Example

Input


3
5 0
18 6 2 4 1
5 0
6 8 1 24 8
1 0
1


Output


3
2
1

Note

In the first test case the division may be as follows:

  * [18, 6] 
  * [2, 4] 
  * [1] 
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.util.Arrays;
import java.util.Random;
import java.util.ArrayList;
import java.util.HashSet;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author sarthakmanna
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        E1SquareFreeDivisionEasyVersion solver = new E1SquareFreeDivisionEasyVersion();
        int testCount = Integer.parseInt(in.next());
        for (int i = 1; i <= testCount; i++)
            solver.solve(i, in, out);
        out.close();
    }

    static class E1SquareFreeDivisionEasyVersion {
        final static int MAXN = 10_000_007;
        int[] sieve;
        final static Helper hp = new Helper((long) 1e9 + 7, MAXN);

        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int i, j, k;

            if (sieve == null) {
                sieve = new int[MAXN];
                Arrays.fill(sieve, 1);
                for (i = 2; i < MAXN; ++i)
                    if (hp.isPrime(i)) {
                        for (j = i; j < MAXN; j += i)
                            if (sieve[j / i] % i > 0) {
                                sieve[j] *= i;
                            }
                    }
            }

            int N = in.nextInt(), K = in.nextInt();
            int[] A = new int[N];
            for (i = 0; i < N; ++i) A[i] = sieve[in.nextInt()];

            int ans = 0;
            for (int p0 = 0; p0 < N; ) {
                HashSet<Integer> s = new HashSet<>();
                int p1 = p0;
                while (p1 < N && !s.contains(A[p1])) {
                    s.add(A[p1++]);
                }
                p0 = p1;
                ++ans;
            }
            out.println(ans);
        }

    }

    static class FastReader {
        static final int BUFSIZE = 1 << 20;
        static byte[] buf;
        static int index;
        static int total;
        static InputStream in;

        public FastReader(InputStream is) {
            try {
                in = is;
                buf = new byte[BUFSIZE];
            } catch (Exception e) {
            }
        }

        private int scan() {
            try {
                if (index >= total) {
                    index = 0;
                    total = in.read(buf);
                    if (total <= 0)
                        return -1;
                }
                return buf[index++];
            } catch (Exception | Error e) {
                System.err.println(e.getMessage());
                return 13 / 0;
            }
        }

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

        public int nextInt() {
            int c, val = 0;
            for (c = scan(); c <= 32; c = scan()) ;
            boolean neg = c == '-';
            if (c == '-' || c == '+')
                c = scan();
            for (; c >= '0' && c <= '9'; c = scan())
                val = (val << 3) + (val << 1) + (c & 15);
            return neg ? -val : val;
        }

    }

    static class Helper {
        public final long MOD;
        public final int MAXN;
        final Random rnd;
        public static int[] sieve;
        public static ArrayList<Integer> primes;

        public Helper() {
            MOD = 1000_000_007;
            MAXN = 1000_006;
            rnd = new Random();
        }

        public Helper(long mod, int maxn) {
            MOD = mod;
            MAXN = maxn;
            rnd = new Random();
        }

        public void setSieve() {
            if (sieve == null || sieve.length < MAXN) {
                primes = new ArrayList<>();
                sieve = new int[MAXN];
                int i, j;
                for (i = 2; i < MAXN; ++i) {
                    if (sieve[i] == 0) {
                        primes.add(i);
                        for (j = i; j < MAXN; j += i) {
                            sieve[j] = i;
                        }
                    }
                }
            }
        }

        public boolean isPrime(int number) {
            setSieve();
            return number <= 1 ? false : sieve[number] == number;
        }

    }
}

