x^2+y^2=z^2.
x+y=2a-z.
xy=2a.
(2a-z)^2=(x+y)^2=z^2+4a.
z=a-1.
(x-y)^2=a^2-6a+1.