I'm having some trouble with the following problem:
Considering an independent system of linear equations in $x$ and $y$ with integer coefficients \begin{equation} ax + by = c_1\\ cx + dy = c_2. \end{equation}
Suppose there does not exist an integer solution for $[c_1,c_2] = [p,0]$ and $[c_1,c_2] = [0,q]$, where $p,q\in\mathbb{Z}$. I would like to show that there does not exist an integer solution for $[c_1,c_2] = [p,q]$.
I already tried using matrix inverses, exploiting the independence of $[p,0]$ and $[0,q]$. However I could not find an answer. Any ideas on the matter are welcome, thanks in advance.
$x+y=1,x-y=0$ has no integer solutions. $x+y=0,x-y=1$ has no integer solutions. $x+y=1,x-y=1$ has integer solutions.