I am studying the proof of the statement
there are infinitely many primes congruent to $1 \bmod 4$
Here is a snippet of the proof:
we first define $a$: $$a = (p_1p_2\cdots p_\ell)+1,\qquad p_i \in \mathbb P$$ but by unique prime factorization theorem, a can also be written as: $$a = q_1q_2\cdots q_n, \qquad q_i \in \mathbb P$$ we know $\{q_1,q_2,\ldots,q_n\}\cap\{p_1,p_2,\ldots,p_\ell\} = \emptyset$
How do I prove the last sentence? I was thinking using contradiction...assume that $p_i$ is in both set $$p_ix+1 = a = p_iy: x,y \in \Bbb Z$$ $$p_i(y-x) = 1$$ so that $p_i$ is not a prime, the only integer solution is $p_i = 1$ (it seems to me that if $a = (p_1p_2\cdots p_\ell)+2, p_i \in \mathbb P$, this proof will fail)
I didn't use any knowledge in math to prove it...is there a better proof?