8. Let $a, b, c$ be three distinct positive integers. If $\{a+b, b+c, c+a\}=\left\{n^{2},(n+1)^{2},(n+\right.$ $\left.2)^{2}\right\}$, then the minimum value of $a^{2}+b^{2}+c^{2}$ is $\qquad$ .
8. 1297 Analysis: Let's assume $a>b>c$, then $a+b>a+c>b+c$. Since $(a+b)+(b+c)+(c+a)=2(a+b+c)$ is an even number, $n^{2},(n+1)^{2},(n+2)^{2}$ must be two odd and one even, thus, $n$ must be an odd number. Also, because $b+c>1$, $n$ must be an odd number no less than 3. If $n=3$, then $\{a+b, b+c, c+a\}=\left\{3^{2}, 4^{2}, 5^{2}\right\}$, so $a+b+c=\frac{1}{2}\left(3^{2}+4^{2}+5^{2}\right)=5^{2}$, and $a+b=5^{2}$, hence $a^{2}+b^{2}+c^{2}=1297$.