Solution (source code)

= Solution
{c}

For a <prime number> $p$, <multiplicativity of the Legendre symbol> says $(PP'/p)=(P/p)(P'/p)$, including the case of a zero factor. Therefore, writing $Q=\prod_i p_i$ with repetitions,
$$
\boxed{\left(\frac{PP'}Q\right)=\prod_i\left(\frac{PP'}{p_i}\right)=\prod_i\left(\frac P{p_i}\right)\prod_i\left(\frac{P'}{p_i}\right)=\left(\frac P Q\right)\left(\frac{P'}Q\right).}
$$
This product definition still agrees with the stipulated zero when the numerator and denominator are not <coprime>. For $Q=1$ all three symbols are $1$.