\[ax - ay + cy - cx - x + y =\]
\[= a(x - y) - c \cdot (x - y) - (x - y) =\]
\[= (x - y)(a - c - 1)\]