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.*;
import java.text.DecimalFormat;
import java.util.*;

public class E1 {
    static long mod = (long) 1e9 + 7;
    static long mod1 = 998244353;

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);


        int t = in.nextInt();
        while (t-- > 0) {

            int n = in.nextInt();
            int k = in.nextInt();
            int[] arr = in.readArray(n);
            int[] val = new int[n];
            HashMap<Integer,Integer> calculated=new HashMap<>();
            for (int i = 0; i < n; i++) {
                if(!calculated.containsKey(arr[i])) {
                    TreeMap<Integer, Integer> prime_count = primeCounter(arr[i]);
                    int v = 0;
                    int mul = 1;
                    for (Map.Entry<Integer, Integer> entry : prime_count.entrySet()) {
                        int num = entry.getKey();
                        int count = entry.getValue();
                        mul *= Math.pow(num, count % 2);
                    }
                    val[i] = mul;
                    calculated.put(arr[i],mul);
                }else{
                    val[i]=calculated.get(arr[i]);
                }
//                out.print(val[i]+" ");
            }
//            out.println();
            int count = 1;
            TreeMap<Integer,Integer> tmap=new TreeMap<>();
            for (int i = 0; i < n; i++) {
                if(tmap.containsKey(val[i])){
                    count++;
//                    out.println(tmap);
                    tmap.clear();
                }
                tmap.put(val[i],1);
            }
            out.println(count);

        }
        out.close();
    }


    static TreeMap<Integer, Integer> primeCounter(int n) {
        TreeMap<Integer, Integer> hmap = new TreeMap<>();
        while (n % 2 == 0) {
            if (hmap.containsKey(2))
                hmap.put(2, hmap.get(2) + 1);
            else
                hmap.put(2, 1);
            n /= 2;
        }
        for (int i = 3; i <= Math.sqrt(n); i += 2) {
            while (n % i == 0) {
                if (hmap.containsKey(i))
                    hmap.put(i, hmap.get(i) + 1);
                else hmap.put(i, 1);
                n /= i;
            }
        }
        if (n > 2) {
            if (hmap.containsKey(n))
                hmap.put(n, hmap.get(n) + 1);
            else
                hmap.put(n, 1);
        }
        return hmap;
    }

    static final Random random = new Random();

    static void ruffleSort(int[] a) {
        int n = a.length;//shuffle, then sort
        for (int i = 0; i < n; i++) {
            int oi = random.nextInt(n), temp = a[oi];
            a[oi] = a[i];
            a[i] = temp;
        }
        Arrays.sort(a);
    }

    static long gcd(long x, long y) {
        if (x == 0)
            return y;
        if (y == 0)
            return x;
        long r = 0, a, b;
        a = Math.max(x, y);
        b = Math.min(x, y);
        r = b;
        while (a % b != 0) {
            r = a % b;
            a = b;
            b = r;
        }
        return r;
    }

    static long modulo(long a, long b, long c) {
        long x = 1, y = a % c;
        while (b > 0) {
            if (b % 2 == 1)
                x = (x * y) % c;
            y = (y * y) % c;
            b = b >> 1;
        }
        return x % c;
    }

    public static void debug(Object... o) {
        System.err.println(Arrays.deepToString(o));
    }

    static String printPrecision(double d) {
        DecimalFormat ft = new DecimalFormat("0.00000000000");
        return String.valueOf(ft.format(d));
    }

    static int countBit(long mask) {
        int ans = 0;
        while (mask != 0) {
            mask &= (mask - 1);
            ans++;
        }
        return ans;
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public int[] readArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) arr[i] = nextInt();
            return arr;
        }
    }
}