Разложите на множители. ax-ay+cy-cx-x+y
(ax-ay)-(cx-cy)-(x-y)=a(x-y)-c(x-y)-(x-y)=(x-y)(a-c-1).
Ax-ay+cy-cx-x+y=(ax-ay)+(cy-cx)-(x-y)=a(x-y)+c(y-x)-(x-y)=a(x-y)-c(x-y)-(x-y)=(x-y)(a-c-1)