7. Let positive integers $a, b, c, d, m, n$ satisfy: $a+b+c$ $+d=m^{2}, a^{2}+b^{2}+c^{2}+d^{2}=1989$, and the largest of $a, b$, $c, d$ is $n^{2}$. Find the values of $m, n$.
7. Solution: Clearly, $a, b, c, d$ are not all even (1 odd or 3 odd), thus $m$ is odd.
$$
\begin{array}{l}
\because m^{2}=a+b+c+d \leqslant \\
\sqrt{4\left(a^{2}+b^{2}+c^{2}+d^{2}\right)}=2 \sqrt{1989}a^{2}+b^{2}+c^{2}+d^{2} =
\end{array}
$$
$1989, \therefore m^{2}>\sqrt{1989}$, i.e., $m^{2} \geqslant 45$,
$\therefore m^{2}=49$ or 81.
If $m^{2}=49$, i.e., $a+b+c+d=49$.
$\because a, b, c, d$'s maximum is $d=n^{2}, \therefore 4 n^{4} \geqslant a^{2}$
$$
+b^{2}+c^{2}+d^{2}=1989, \therefore n \geqslant 5 \text {, }
$$
$\because a+b+c=49-n^{2}, \therefore 5 \leqslant n \leqslant 6$, i.e., $n=5$
or $6, d=25$ or 36.
$a+b+c=24$ or $13, a^{2}+b^{2}+c^{2}=1364$ or 693,
$$
\begin{array}{l}
\because(a+b+c)^{2}=24^{2}=576>a^{2}+b^{2}+c^{2} \text { or } \\
(a+b+c)^{2}=13^{2}=169>a^{2}+b^{2}+c^{2},
\end{array}
$$
$\therefore$ there is no solution in this case.
$$
\begin{array}{l} 
\therefore m^{2}=a+b+c+n^{2}=81, a^{2}+b^{2}+c^{2}+ \\
n^{4}=1989,
\end{array}
$$
$\because 4 n^{2} \geqslant 81, \therefore n \geqslant 5, \because 1989-n^{4} \geqslant 3$, i.e., $n^{4} \leqslant 1992, \therefore 5 \leqslant n \leqslant 6$, i.e., $n=5$ or 6.

When $n=5$, $a+b+c=56, a^{2}+b^{2}+c^{2}=$ 1364,
$\because 4 \mid 1364=a^{2}+b^{2}+c^{2}, \therefore a, b, c$ are all even: $a=2 a_{1}, b=2 b_{1}, c=2 c_{1}$, and
$$
\begin{array}{l}
a_{1}^{2}+b_{1}^{2}+c_{1}^{2}=341, a_{1}+b_{1}+c_{1}=28, \\
\because a_{1}^{2}+b_{1}^{2}+c_{1}^{2}=341 \equiv 1(\bmod 4),
\end{array}
$$
$\therefore a_{1}, b_{1}, c_{1}$ must be two even and one odd: $a_{1}=$ $2 a_{2}, b_{1}=2 b_{2}, c_{1}=2 k-1$, and $2\left(a_{2}+b_{2}+k\right)=29$, contradiction!
When $n=6$, $a+b+c=45, a^{2}+b^{2}+c^{2}=$ 693,
$$
\because 693 \equiv 1(\bmod 4), \therefore a=2 a_{1}, b=2 b_{1}, c=
$$
$2 k-1$, and $a_{1}+b_{1}+k=23, a_{1}^{2}+b_{1}^{2}+k(k-1)=$ 173,
$\because k(k-1)$ is even, $\therefore a_{1}, b_{1}$ are one odd and one even: $a_{1}$ $=2 a_{2}, b_{1}=2 r-1$, and $2 a_{2}+2 r+k=24$,
$$
4 a_{2}^{2}+4 r(r-1)+k(k-1)=172, \therefore 2 \mid k \text {, }
$$
$4|k(k-1), \therefore 4| k$,
$$
\text { Also, } \because 173-k(k-1)=a_{1}^{2}+b_{1}^{2} \geqslant \frac{\left(a_{1}+b_{1}\right)^{2}}{2}
$$
$=\frac{(23-k)^{2}}{2}$, i.e., $k^{2}-16 k+61 \leqslant 0$,
$$
\therefore 7 \leqslant k \leqslant 9, \because 4 \mid k, \therefore k=8, a_{2}+r=8, a_{2}^{2}
$$
$+r(r-1)=29$, eliminating $a_{2}$ gives $2 r^{2}-17 r+35=0$, solving for $r=5,(a, b, c, d)=(12,18,15,36)$,
$$
\therefore m^{2}=81, n^{2}=36,(m, n)=(9,6) \text {. }
$$