Given an array \$A\$ of size \$n\$. You have to find the number of subsets such that their product is in the form of \$p_1 \times p_2 \times p_3 \dots\$ where \$p_1, p_2, p_3, \dots\$ are prime numbers. No prime number should appear more than once, i.e. the product is "squarefree".
Example: Lets pick an array \$A\$ of size \$5\$. \$A[5] = \{2, 3, 15, 55, 21\}\$ The subsets in our answers should be \$\{2,3\}, \{2, 15\}, \{2, 55\}, \{2, 21\}, \{2, 3, 55\}, \{2, 55, 21\}, \{3, 55\}, \{55, 21\}\$. Lets take \$\{2, 3, 55\}\$ The product will be \$2 \times 3 \times 55 = 2 \times 3 \times 5 \times 11\$. Thus all prime numbers with power of 1. We can't take for example \$\{3, 15\}\$ because \$3 \times 15 = 3^2 \times 5\$. Condition not satisfied. Therefore our answer should be number of subsets i.e. here 8.
Constraints: \$2\leq A_i<10^9\$, \$1\leq n<10^5\$