Algebra Level 5

Consider all pairs of non-zero integers $$(a,b)$$ such that the equation

$( ax-b)^2 + (bx-a)^2 = x$

has at least one integer solution.

The sum of all (distinct) values of $$x$$ which satisfy the above condition can be written as $$\frac{ m}{n}$$, where $$m$$ and $$n$$ are coprime positive integers. What is the value of $$m + n$$?

×