2. On a line, several points were marked, including points $A$ and $B$. All possible segments with endpoints at the marked points are considered. Vasya calculated that point $A$ is inside 50 of these segments, and point $B$ is inside 56 segments. How many points were marked? (The endpoints of a segment are not considered its internal points.)
Answer: 16.

Solution. Let there be $a_{1}$ points on one side of point $A$ and $a_{2}$ points on the other side; $b_{1}$ points on one side of point $B$ and $b_{2}$ points on the other side. We can assume that $a_{1} \leqslant a_{2}, b_{1} \leqslant b_{2}$. Then $a_{1} a_{2}=50, b_{1} b_{2}=56$. At the same time, $a_{1}+a_{2}=b_{1}+b_{2}$. Let's consider all possible factorizations of the numbers 50 and 56:

$$
50=1 \cdot 50=2 \cdot 25=5 \cdot 10 ; \quad 56=1 \cdot 56=2 \cdot 28=4 \cdot 14=7 \cdot 8
$$

Only in one case do the sums of the divisors of these two numbers match: $5+10=7+8$. Therefore, $a_{1}=5, a_{2}=10, b_{1}=7, b_{2}=8$, and there are a total of 16 points.

Evaluation. 12 points for a correct solution. 2 points for a correct answer (without justification). If the correctness of the answer is shown but the uniqueness is not justified, 6 points.