product array, check for perfect squares