5.7. (Yugoslavia, 77). Find all values of $n \in \mathbf{N}$ that have the following property: the fifth power of the sum of the digits in the decimal representation of the number $n$ is equal to $n^{2}$.

将上面的文本翻译成英文，请保留源文本的换行和格式，直接输出翻译结果。 

---

Note: The last sentence is a repetition of the instruction and should not be included in the translated text. Here is the corrected version:

5.7. (Yugoslavia, 77). Find all values of $n \in \mathbf{N}$ that have the following property: the fifth power of the sum of the digits in the decimal representation of the number $n$ is equal to $n^{2}$.
5.7. Let $n$ be the desired number, $s$ be the sum of the digits of its decimal representation, and $k$ be the number of these digits. Then the following relations hold:

$$
s^{6}=n^{2}, \quad s \leqslant 9 k, \quad n \geqslant 10^{k-1},
$$

from which we obtain that

$$
9^{5} k^{5} \geqslant s^{5}=n^{2} \geqslant 10^{2 k-2}
$$

Let

$$
a_{k}=9^{5} k^{6} / 10^{2 k-2}
$$

then from the relations

$$
\frac{9^{5}(k+1)^{5}}{9^{5} k^{5}}=\frac{(k+1)^{5}}{k^{5}} \leqslant 2^{5}<10^{2}=\frac{10^{2}(k+1)-2}{10^{2 k-2}}
$$

valid for each value of $k \in \mathbf{N}$, we get the estimate $a_{k+1}<a_{k}$, i.e., the sequence of numbers $a_{k}$ is decreasing. Since $a_{6}<1$, then for all $k \geqslant 6$ we have the inequalities

$$
9^{5} k^{5}<10^{2 k-2},
$$

which means that the number $k$ cannot take values greater than 5. Therefore, $s \leqslant 9 \cdot 5=45$. From the equality $s^{5}=n^{2}$, we conclude that the number $s$ must be a square of some natural number, since all prime divisors in the factorization of the number $s^{5}$ (and hence the number $s$) into prime factors must have even exponents. Therefore, the number $s$ can only take the following values: $1,4,9,16,25,36$. Checking shows that only for two values $s=1$ and $s=9$ the number $n=\sqrt{s^{5}}$ has a sum of digits equal to $s$. Therefore, the condition of the problem is satisfied by two values $n=1$ and $n=243$.