#d2561. 变成相同的数
变成相同的数
Making Equal Numbers
Problem Description
You are given integers. You may perform any number of operations, each time choosing one number and multiplying it by or by . Determine whether you can make all numbers equal.
Input Format
The first line contains an integer , the number of test cases.
The next lines: each line begins with an integer , followed by integers.
Output Format
For each test case, output YES or NO.
Sample Input
2
4 75 150 75 50
3 100 150 250
Sample Output
YES
NO