Factor x^2-ac-cx+ax