For $n$ people, if it is known that

(a) there exist two people knowing each other among any three people, and

(b) there exist two people not knowing each other among any four people.

Find the maximum of $n$.

Here, we assume that if $A$ knows $B$, then $B$ knows $A$.
To find the maximum number of people \( n \) such that the given conditions hold, we will use the principles of graph theory and Ramsey's theorem.

1. **Restate the problem in graph theory terms:**
   - Let each person be represented by a vertex in a graph.
   - An edge between two vertices indicates that the corresponding people know each other.
   - Condition (a) states that in any subset of three vertices, there is at least one edge.
   - Condition (b) states that in any subset of four vertices, there is at least one pair of vertices with no edge between them.

2. **Apply Ramsey's theorem:**
   - Ramsey's theorem \( R(3,3) = 6 \) tells us that any graph with 6 vertices will either contain a triangle (3 vertices all connected) or an independent set of 3 vertices (3 vertices with no edges between them).
   - Condition (a) implies that there cannot be an independent set of 3 vertices, so any subset of 3 vertices must form a triangle.

3. **Analyze the implications of condition (b):**
   - Condition (b) implies that in any subset of 4 vertices, there must be at least one pair of vertices with no edge between them. This means that the graph cannot be a complete graph \( K_4 \) for any subset of 4 vertices.

4. **Consider the maximum \( n \):**
   - Suppose \( n \geq 9 \). We will show that this leads to a contradiction.
   - If \( n = 9 \), each vertex must be connected to exactly 5 other vertices to avoid both conditions (a) and (b) leading to contradictions.
   - This would mean that the graph is a 5-regular graph (each vertex has degree 5).

5. **Check the feasibility of a 5-regular graph with 9 vertices:**
   - The total number of edges in a 5-regular graph with 9 vertices is \( \frac{9 \times 5}{2} = 22.5 \), which is not an integer. Hence, a 5-regular graph with 9 vertices is not possible.

6. **Consider \( n = 8 \):**
   - We need to check if a graph with 8 vertices can satisfy both conditions.
   - If each vertex is connected to at least 4 other vertices, then any subset of 3 vertices will have at least one edge, satisfying condition (a).
   - To satisfy condition (b), we need to ensure that no subset of 4 vertices forms a complete graph \( K_4 \).

7. **Construct a graph with 8 vertices:**
   - One possible construction is a bipartite graph \( K_{4,4} \), where each vertex in one set is connected to all vertices in the other set.
   - In \( K_{4,4} \), any subset of 3 vertices will have at least one edge, satisfying condition (a).
   - Any subset of 4 vertices will have at least one pair of vertices with no edge between them, satisfying condition (b).

Thus, the maximum number of people \( n \) that satisfies both conditions is 8.

The final answer is \( \boxed{8} \).