This is a discrete extremum problem, the basic strategy for solving it is to start from an initial state, that is, arbitrarily dividing into 30 groups with different point numbers, then study how to adjust to maximize the number of points forming triangles.

Suppose 1989 points are divided into 30 groups, and the point numbers of these 30 groups are all different. Let the point numbers of these 30 groups be
and
$$
\sum_{i=1}^{30} n_{i}=1989 .
$$

The total number of triangles with vertices in three different groups is
$$
S=\sum_{1 \leqslant i < j < k \leqslant 30} n_{i} n_{j} n_{k} .
$$

If we adjust the point numbers of two groups, say $n_{i_{0}}$ and $n_{j_{0}+1}$, such that
$$
\begin{array}{c}
n_{i_{0}}^{\prime}=n_{i_{0}}+1, \\
n_{j_{0}+1}^{\prime}=n_{j_{0}+1}-1, \\
n_{j_{0}}>n_{i_{0}} \text {, then } \\
n_{j_{0}+1}-n_{i_{0}}-1>0, \\
n_{i_{0}}^{\prime} \cdot n_{j_{0}+1}^{\prime}>n_{i_{0}} n_{j_{0}+1} \text {. }
\end{array}
$$

Therefore, $S$ will increase.
From this adjustment, we can see that $S$ will be larger when the difference between adjacent groups is 1. However, can we make the difference between all adjacent groups equal to 1?

If the difference between all adjacent groups is 1, then $n_{1}, n_{2}, \cdots, n_{30}$ form an arithmetic sequence with a common difference of 1. In this case,
$$
\begin{array}{c}
30 n_{1}+\frac{30 \times 29}{2}=1989, \\
30 n_{1}=1554,
\end{array}
$$

At this time, $n_{1}$ is not an integer.
Therefore, when adjusting, we must retain one pair of adjacent groups with a difference of 2.
From the above, let the point numbers of these 30 groups be
$$
m, m+1, \cdots, m+i-1, m+i+1, m+i+2, \cdots, m+30,
$$

Thus,
$$
\begin{array}{c}
30 m-i+(1+2+\cdots+30)=1989, \\
30 m-i=1524,
\end{array}
$$

Therefore,
$$
m=51, i=6,
$$

This means that when 1989 points are divided into 30 groups with the following point numbers
$$
51,52, \cdots, 55,56,58,59, \cdots, 81
$$

$S$ reaches its maximum value.
[Example 3.3.8] In space, there are 1989 points, no three of which are collinear. Divide them into 30 groups with different numbers of points. For any three different groups, take one point from each to form a triangle. To maximize the total number of such triangles, how many points should each group have?