$a,b\in \mathbb{Z}$
Factors of $a$: $a_1,a_2,...,a_n$.
Factors of $b$: $b_1,b_2,...,b_m$
Prove that if $\frac{a}{b}$ is irreducible, then $\frac{a_ia_j}{b_kb_l}$ is irreducible for all $i,j,k,l$.
I proved the case where $i=j, k=l$ using the fact that the square root of any non-perfect square is irrational.
I can't prove the more general case though.
EDIT: not just prime factors, just all the integer factors. E.g. 12: 1,2,3,4,6,12