Problem: A sequence of positive integers is called great for a positive integer , if we can split it into pairs in such a way that in each pair the first number multiplied by is equal to the second number. More formally, a sequence of size is great for a positive integer , if is even and there exists a permutation of size , such that for each () .
Sam has a sequence and a positive integer . Help him to make the sequence great: find the minimum possible number of positive integers that should be added to the sequence to make it great for the number .
Input Format: Each test contains multiple test cases. The first line contains a single integer () — the number of test cases. Description of the test cases follows.
The first line of each test case contains two integers , (, ).
The next line contains integers ().
It is guaranteed that the sum of over all test cases does not exceed .
Output Format: For each test case print a single integer — the minimum number of integers that can be added to the end of to make it a great sequence for the number .
Note: In the first test case, Sam got lucky and the sequence is already great for the number because you can divide it into such pairs: , . Thus we can add numbers.
In the second test case, you can add numbers and to the sequence, then you can divide all integers into such pairs: , , , . It is impossible to add less than integers to fix the sequence.