Alice has N apples in a straight line. The ith apple has the tastiness value of A[i], where 0<=i<N. In one operation, you can do any of the following operations.
Alice gives you the task of making the tastiness value of all apples equal. Print Yes if you can complete the task, else print No.
Input Format:
Output Format:
For each test case, print Yes if you can complete the task, else print No.
Constraints:
1<=T<=10
1<=N<=105
0<=A[i]<=109
First test case:
In the first operation, choose apple at index 2. Divide its tastiness value by 2. So, A[2] will now be 1. In the second operation, choose apple at index 3. Divide its tastiness value by 2. So, A[3] will now be 1. The array A becomes [1,1,1,1]. Hence, the answer is Yes.
Second test case:
It is not possible to make the tastiness value of all apples equal. Hence, the answer is No.