$\text{lcm}(a,b)+7\gcd (a,b) = a^2+b^2$ 
Find all positive integers such that $\text{lcm}(a,b)+7\gcd (a,b) = a^2+b^2$.

I thought about setting $a = ck$ and $b = dk$, where $\gcd(c,d) = 1$, which makes our expression become $$cdk+7k = (ck)^2+(dk)^2.$$ Equivalently, $$cd+7 = k(c^2+d^2).$$ How do we continue from here or is there an easier way?

We must find all pairs of coprime positive $c,d$ such that $c^2+d^2| cd+7$.
( we can let $c\leq d$ to ease calculations)
Notice that $c^2+d^2\geq 2cd$, so we must have $cd\leq 7$.
The only pairs of coprime positive integers $c,d$ with $cd\leq 7$ are:
$(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(2,3)$
Of course $1+d^2> d+7$ for $d\geq 3$.
So we must only check $(1,1),(1,2),(2,3)$ and it turns out that only $(1,1)$ and $(2,3)$ work ( the first gives $k=4$ and the second $k=1$).
So the set of solutions is:
$(4,4),(2,3)$ and $(3,2)$
