The Chinese remainder theorem is a theorem that says that if you have a system of linear congruences of the form x ≡ a₁ (mod n₁), x ≡ a₂ (mod n₂), ..., x ≡ aᵢ (mod nᵢ), where n₁, n₂, ..., nᵢ are pairwise relatively prime integers, then there is a unique solution modulo N = n₁n₂...nᵢ.