Solve the system of linear congruence. Problem:  Solve $$x\equiv8\pmod {12}$$ $$x\equiv6\pmod {9}$$ Now I have read about the Chinese Remainder Theorem, which is particularily helpful in solving systems of linear congruence, but in this notice that the moduli are not relatively prime (pairwise). So, I cannot apply the theorem. In fact this leads me to a general question: If we are given as system: $$a_1x\equiv b_1\pmod {n_1}$$ 
$$a_2x\equiv b_2\pmod {n_2}$$ 
$$a_3x\equiv b_3\pmod {n_3}$$ 
$$a_4x\equiv b_4\pmod {n_4}$$ 
$$...$$ 
$$a_rx\equiv b_r\pmod {n_r}$$ 
where the moduli are not pairwise relatively prime. How do we go about solving this system and what are the conditions that determine the solvability of the system. 

Hint. Note that 
$$x\equiv8\pmod {12}\Rightarrow x=12k+8=4(3k+2) \mbox{ with $k\in \mathbb{Z}$}\Rightarrow \mbox{$x$ is divisible by $4$}$$
In a similar way
$$x\equiv 6\pmod {9}\Rightarrow x=9j+6=3(2+3j) \mbox{ with $j\in \mathbb{Z}$}\Rightarrow \mbox{$x$ is divisible by $3$}$$
What may we conclude?
More generally the linear system
$$x\equiv a\pmod {m}$$ $$x\equiv b\pmod {n}$$ 
has a solution iff $\gcd(m,n)$ divides $(a-b)$.
