$\begingroup$

A few of my current programming problems boil down to solving inequalities over modular domains and possibility could benifit from knowledge of efficient maths/algorithms rather than brute force search version I currently use.

Given a problem of the following form:

$a,b,c,d,e,f,g,i,n \in \mathbb{Z}$

$a \le n < b+a \pmod{c}$

$d \le n < e+d \pmod{f}$

$g \le n < h+g \pmod{i}$

where $a,b,c,d,e,f,g,i$ are given constants, does a $n$ exist? In my case it is not important to known what $n$ is.