public String getAnswer(int[] A)
	{
		Arrays.sort(A);
		for (int i = 1; i < A.length; i++) {
			if (A[i] % A[0] > 0) {
				return "NO";
			}
			int num = A[i] / A[0];
			if (num == 1 || isDouble(num)) {
			} else {
				return "NO";
			}
		}
		return "YES";
	}