Four. (50 points) Take $n$ points on the coordinate plane with no three points collinear, and color each point one of red, green, or yellow, such that the following three conditions are satisfied:
(1) In any triangle with all three vertices red, there is at least one green point inside;
(2) In any triangle with all three vertices green, there is at least one yellow point inside;
(3) In any triangle with all three vertices yellow, there is at least one red point inside.
Find the maximum value of the positive integer $n$.
Four, Solution: Let there be $a$ red points, their convex hull is a convex $k$-gon, inside which there are $b$ green points, their convex hull is an $l$-gon, inside which there are $c$ yellow points, their convex hull is an $m$-gon, inside which there are $a^{\prime}$ red points.

If a triangle has three vertices of the same color, then it is called a red, green, or yellow triangle.
$\because$ The convex hull of all red points is exactly divided into $2a-k-2$ non-overlapping red triangles, each of which contains at least one green point, $\therefore b \geqslant 2a-k-2$. Similarly, $c$ $\geqslant 2b-l-2 \geqslant b-2, a^{\prime} \geqslant 2c-m-2 \geqslant c-2$.
$\because$ The $k$ red vertices of the red convex hull are not counted in the $a^{\prime}$ red points,
$$
\begin{array}{c}
\therefore \quad a \geqslant a^{\prime}+k \geqslant(c-2)+k \geqslant(b-2)-2 \\
+k \geqslant(2a-k-2)-4+k=2a-6,
\end{array}
$$

Thus, $a \leqslant 6$. By symmetry, we get $b \leqslant 6, c \leqslant 6$. Therefore, $n=a+b+c \leqslant 18$, with equality holding when $a=b=c=6$.
Construction: Consider 6 red points: According to the previous discussion, there should be 4 green points inside the convex hull of these red points, placed as shown in the figure. Here, $R_{1}, R_{2}, R_{3}, R_{4}, R_{5}, R_{6}$ are red points, and points $G_{1}, G_{2}, G_{3}, G_{6}$ are green points. All points are symmetrically placed about point $O$, and rectangles $R_{1} G_{3} R_{4} G_{1}$ and $G_{4} R_{2} G_{2} R_{5}$ have a side length ratio of $1: \sqrt{3}$. Note that each red triangle contains exactly one green point.

Place the other two green points at the positions where red points $I, J$ would land after a $60^{\circ}$ counterclockwise rotation about point $O$. Similarly, place the yellow points at the positions where green points would land after a $60^{\circ}$ counterclockwise rotation about point $O$. By symmetry, this gives the required placement.