5. Find the number of pairs of integers $(a ; b)$ such that $1 \leqslant a \leqslant 70, 1 \leqslant b \leqslant 50$, and at the same time,
the area $S$ of the figure defined by the system of inequalities

$$
\left\{\begin{array}{l}
\frac{x}{a}+\frac{y}{b} \geqslant 1 \\
x \leqslant a \\
y \leqslant b
\end{array}\right.
$$

is such that the number $2 S$ is divisible by 5.
Answer: 1260.

Solution. The given system of inequalities defines a triangle on the plane with vertices $(a ; 0),(0 ; b)$, and $(a ; b)$. This triangle is right-angled, and its doubled area is equal to the product of the legs, i.e., $a b$. According to the condition, $a b \vdots 5$, so one of the numbers $a$ or $b$ must be divisible by 5.

Under the given constraints, there are 14 values of $a$ and 10 values of $b$ that are multiples of 5. Therefore, there are $14 \cdot 50=700$ pairs $(a ; b)$ such that $a \vdots 5$ and $10 \cdot 70=700$ pairs such that $b \vdots 5$. Additionally, there are $14 \cdot 10=140$ pairs such that both numbers $a$ and $b$ are divisible by 5. Thus, the total number of desired pairs is $700+700-140=1260$.