8. Given integers $m \geqslant 3, n \geqslant 3$. Let the set
$$
S=\{(a, b) \mid a \in\{1,2, \cdots, m\}, b \in\{1,2, \cdots, n\}\} \text {, }
$$
$A$ be a subset of $S$. If there do not exist positive integers $x_{1} 、 x_{2} 、 x_{3} 、 y_{1} 、$ $y_{2} 、 y_{3}$, such that $x_{1}<x_{2}<x_{3}, y_{1}<y_{2}<y_{3}$, and $\left(x_{1}, y_{2}\right)$ 、 $\left(x_{2}, y_{1}\right) 、\left(x_{2}, y_{2}\right) 、\left(x_{2}, y_{3}\right) 、\left(x_{3}, y_{2}\right) \in A$, find the maximum number of elements in the set $A$. (Supplied by He Yijie)
8. If a set $X$ contains a point $\left(x_{2}, y_{2}\right)$, and in the four directions up, down, left, and right, there are points $\left(x_{2}, y_{3}\right)$, $\left(x_{2}, y_{1}\right)$, $\left(x_{1}, y_{2}\right)$, and $\left(x_{3}, y_{2}\right)$ in $X$, then $X$ is called a "central point set". Thus, the original problem is equivalent to determining the maximum number of points that can be selected from the point set $S$ such that the set $A$ formed by these points is not a central point set.

First, take all points in $S$ with horizontal coordinates 1 or $m$, and vertical coordinates 1 or $n$, to form the set $A_{0}$. Clearly, $A_{0}$ is not a central point set. At this point,
$$
\left|A_{0}\right|=2 m+2 n-4 \text {. }
$$

Next, we prove: If $A \subseteq S,|A| \geqslant 2 m+2 n-3$, then $A$ must be a central point set.

For $1 \leqslant i \leqslant n$, let the number of points in $A$ with vertical coordinate $i$ be $k_{i}$. If $k_{i} \geqslant 3$, then color the points in $A$ in that row, except the leftmost and rightmost points, red. Thus, there are at least
$$
\left(k_{1}-2\right)+\left(k_{2}-2\right)+\cdots+\left(k_{n}-2\right)=|A|-2 n
$$

points colored red.
For $2 \leqslant j \leqslant m-1$, let the number of points in $A$ with horizontal coordinate $j$ be $l_{j}$. If $l_{j} \geqslant 3$, then color the points in $A$ in that column, except the top and bottom points, blue; and color all points in $A$ with horizontal coordinates 1 or $m$ blue. Thus, there are at least
$$
\begin{array}{l}
l_{1}+\left(l_{2}-2\right)+\cdots+\left(l_{m-1}-2\right)+l_{m} \\
=|A|-2 m+4
\end{array}
$$

points colored blue.
Notice that,
$$
\begin{array}{l}
(|A|-2 n)+(|A|-2 m+4) \\
=(|A|-2 n-2 m+3)+|A|+1 \\
>|A|,
\end{array}
$$

there must be a point that is colored both red and blue, and this point's horizontal coordinate is not 1 or $m$ (points with horizontal coordinates 1 or $m$ cannot be colored red).

By the coloring method, we know that this point has points in $A$ in all four directions up, down, left, and right. Hence, $A$ is a central point set.
In summary, the maximum number of elements in the set $A$ is
$$
2 m+2 n-4 \text {. }
$$