Maximum number of elements in array A that can be reduced to 1 by using operation at most K times : <p>You have an array A of length N. you can perform an operation (you can perform the operation multiple times) on the elements of the array A.In the operation you can divide any element by its smallest factor greater than 1. You will be given Q tasks.In each task, you will be given an integer K and you have to tell the maximum number of elements in array A that can be reduced to 1 by using the operation at most K times.</p>

<p><strong>Input:</strong></p>

<p>First line contains two space-separated integers, N and Q.</p>

<p>Second line contains N space separated integers denoting the elements of array A.</p>

<p>Next Q lines contain an integer each, denoting the value of K.</p>

<p><strong>Output:</strong></p>

<p>For each task, print the answer of the t<sup>th</sup> task in new line.</p>

<pre><code>Example Input:                          Example Output:
3 3                                     1
8 9 12                                  3
3                                       0
10
1

Explanation:
Number of operations required are 3,2,3 respectively.
For the first task, we can reduce any one of the three elements to 1.
For second task, we can reduce all the elements of the array to 1.
For third task, we cannot reduce any elements to 1.
</code></pre>
