Example 8 On the $x O y$ plane, there are 2002 points forming a point set $S$. It is known that the line connecting any two points in $S$ is not parallel to the coordinate axes. For any two points $P$ and $Q$ in $S$, consider the rectangle $M_{P Q}$ with $P Q$ as its diagonal, and its sides parallel to the coordinate axes. Let $W_{P Q}$ denote the number of points in $S$ inside the rectangle $M_{P Q}$ (excluding $P$ and $Q$).

When the statement: "There is at least one pair of points $P$ and $Q$ in $S$ such that $W_{P Q} \geqslant N$, regardless of how the points in $S$ are distributed on the coordinate plane" is true, find the maximum value of $N$. (2002 Japan Mathematical Olympiad Round 2)
Solve $N_{\max }=400$. First, prove that there must be $P, Q$ such that $W_{P Q} \geqslant 400$. In fact, let $A$ be the point in $S$ with the largest y-coordinate, $B$ be the point in $S$ with the smallest y-coordinate, $C$ be the point in $S$ with the largest x-coordinate, and $D$ be the point in $S$ with the smallest x-coordinate. If any two of $A, B, C, D$ coincide, the conclusion is obviously true (in this case, assume $A=C$, then $M_{A B}, M_{B D}, M_{A D}$ cover $S$, thus $\max \left\{W_{A B}, W_{B D}, W_{A D}\right\} \geqslant \frac{2002-3}{3}>400$). If $A, B, C, D$ are all distinct, then their distribution is as shown in Figure 7-4. $\square$

For cases (1) and (4), $M_{A C}, M_{B C}, M_{A D}, M_{B D}$ cover $S$, thus $\max \left\{W_{A C}, W_{B D}, W_{A D}, W_{B C}\right\} \geqslant \frac{2002-4}{4}>400$.

For cases (2) and (3), $M_{A C}, M_{B C}, M_{A D}, M_{B D}, M_{A B}$ cover $S$, thus $\max \left\{W_{A C}, W_{B D}, W_{A D}, W_{B C}, W_{A B}\right\} \geqslant \frac{2002-4}{5}>399$, thus $\max \left\{W_{A C}, W_{B D}, W_{A D}, W_{B C}, W_{A B}\right\} \geqslant 400$. Therefore, there must be $P, Q$ such that $W_{P Q} \geqslant 400$.

Next, prove that there exists such an $S$ such that for all $P, Q \in S$, $W_{P Q} \leqslant 400$. In fact, as shown in Figure 7-5, divide the 2002 points in $S$ into 5 groups $E, F, G, H, I$, where $H, F$ each have 401 points, and $E, I, G$ each have 400 points, with the points in each group located on the diagonals of the corresponding squares. Clearly, for any rectangle $M_{P Q}$ $(P, Q \in S)$, it contains points from at most one group. If it contains points from group $I$, then $W_{P Q} \leqslant 400$. If rectangle $M_{P Q}$ contains points from groups other than $I$, then at least one of the points $P, Q$ belongs to this group, thus $W_{P Q} \leqslant 401-1=400$.

Figure 7-5 In summary, $N_{\text {max }}=400$.