Some Analysis
 In a perfect square, all the factors are raised to an even exponent.
 Thus, when multiplying integers to form a perfect square, what matters is their unevenexponented factors.
 Thus, an integer can be represented (as far as we're concerned) as a vector of its squaring factors:

 120 = 2^3 * 3^1 * 5^1
 120[sq] = 2 * 3 * 5
 When multiplying two squaring vectors, their components cancel each other. So if p existed in both vectors, it won't exist in the product.