Sequence
Given a sequence of 2N natural numbers, it is known that these numbers can be paired such that the sum of each pair is the same. For instance, in the sequence 99, 23, 77, 1, the pairs can be formed as 1 + 99 = 77 + 23.
Your task is to write a program that checks whether this sequence can also be paired such that the product of the numbers in each pair is the same.
Input
The first line contains the number of test cases. For each test case, the first line specifies the number of numbers 2N (1 ≤ N ≤ 50000) in the sequence. Each of the next 2N lines contains an integer ranging from 1 to 10^9, representing the elements of the sequence.
Output
For each test case, output a separate line with the number 1 if the sequence can be paired such that the products of the pairs are the same, and 0 if it cannot.