I first claim for any triple $i,j,k$ of distinct numbers, $(a_i,a_j,a_k)=1$. Assume the contrary. Note that $(a_i,P(a_i))=1$ for any $i$. So, $a_i\mid P(a_j)P(a_k)$. Now if $p$ is a prime dividing $a_i,a_j,a_k$, then $p\mid P(a_j)P(a_k)$, but $P(a_j)P(a_k)\equiv 1\pmod{p}$, a contradiction. So, $(a_i,a_j,a_k)=1$ as claimed.
Now assume the contrary and let $a_1<\cdots<a_{8002}$. Note that $a_i\mid P(a_1)P(a_2)$ for any $3\le i\le 8002$. Next, we consider the product $P=\textstyle \prod_{3\le i\le 8002}a_i$. Take any prime $p\mid P$. Then by the fact $(a_i,a_j,a_k)=1$, we get that there exists at most two indices $i$ and $j$ such that $p\mid a_i,a_j$. From here, we immediately obtain $P\mid P(a_1)^2 P(a_2)^2$. Lastly,
\[
P \le P(a_1)^2 P(a_2)^2\le a_1^{4000}a_2^{4000}<a_3\cdots a_{8002}=P,
\]a contradiction.