3B. The bisector of angle $ABC$ and the bisector of angle $BCD$ in trapezoid $ABCD$, intersect at point $M$ on the leg $AD$ of the trapezoid. Calculate the area of trapezoid $ABCD$, if it is known that $\overline{MB}=p, \overline{MC}=q$ and the height of the trapezoid $h$ ( $h$ is the distance between the bases $AB$ and $CD$ of the trapezoid).
Solution. Let $\measuredangle A B M=\varphi$, $\measuredangle D C M=\psi$, i.e., $\measuredangle A B C=2 \varphi, \measuredangle B C D=2 \psi$.

Then from $2 \varphi+2 \psi=180^{\circ}$ it follows that $\varphi+\psi=90^{\circ}$, so triangle $B C M$ is a right triangle and we have $\overline{B C}=\sqrt{p^{2}+q^{2}}$. Let $N$ be the midpoint of $B C$, then $\overline{N M}=\overline{N C}=\overline{N B}$. Now $\measuredangle C M N=\measuredangle M C N$ and from this $\measuredangle C M N=\measuredangle M C D$, so $M N\|D C\| A B$. Since $N$ is the midpoint of $B C$, it follows that $M$ is the midpoint of $A D$. Clearly,

![](https://cdn.mathpix.com/cropped/2024_06_05_a11ff5dd9a0a1c832502g-09.jpg?height=469&width=524&top_left_y=328&top_left_x=940)
$M N$ is the midline of the trapezoid and from this $P=\overline{M N} \cdot h=\frac{\overline{B C}}{2} \cdot h=\frac{h \sqrt{p^{2}+q^{2}}}{2}$.

4AB. Find all prime numbers $p$ for which the system

$$
\left\{\begin{array}{l}
p+49=2 x^{2} \\
p^{2}+49=2 y^{2}
\end{array}\right.
$$

has a solution in the set of natural numbers.