Let $a$ and $b$ be positive real numbers such that $(65a^2 + 2ab + b^2)(a^2 + 8ab + 65b^2) = (8a^2 + 39ab + 7b^2)^2$. Then one possible value of $\frac{a}{b}$ satisfies $2 \left(\frac{a}{b}\right) = m + \sqrt{n}$, where $m$ and $n$ are positive integers. Find $m + n$.

Let's think step by step and output the final answer within \boxed{}.
user