# Perfect Fourth Power - Pigeon Hole Principle

Let $a_1, a_2, ..., a_n$ be positive integers all of whose prime divisors are $\le$ 13.

Show that if $n \ge 193$ then there exists four of these integers whose product is a perfect fourth power.

I tried getting many pairs of numbers which multiply to a square but did not get far. For part b, it seems like I want to get two disjoint pairs $a, b$ and $c, d$ such that $\sqrt{ab}\sqrt{cd}$ is a square.

HINT: Consider the exponents of the primes in the factorization of the $a_i$, and think of them $\pmod 4$.
Each of the $a_i$, as well as any product of $a_i$, can be written in the form $$2^{p_2}3^{p_3}5^{p_5}7^{p_7}11^{p_{11}}13^{p_{13}}\cdot n^4$$ where each of the $p_i$ is one of {0, 1, 2, 3}. For example, $$5,244,319,080,000 = 2^23^15^07^311^213^1\cdot(6^4),$$ and $$135 = 2^03^35^17^011^113^0\cdot(1^4).$$
You want to find four of the $a_i$ whose product has each of the $p_i$ equal to zero$\pmod 4$.