In mathematics, especially in set theory, set A is a subset of set B, or equivalently B is a superset of set A if A is contained inside B, that is, all elements of A are also elements of B.
You’re given a set of N positive integers. How many ways can you select two disjoint non-empty subsets, such that the multiplication of elements in both subsets is equal.
Input starts with an integer T (T ≤ 3), denoting the number of test cases. Each case contains an integer N (1 ≤ N ≤ 25) denoting the number of elements of an array. The next line contain array A (1 ≤ A[i] ≤ 25) of N distinct numbers.
For each test case print the required answer on a line by itself.
2 1 1 6 1 2 3 4 5 6
For the second case, the valid combinations are: