2. The lengths of the sides of a rectangle are natural numbers. Determine those lengths if the numerical value of the area of this rectangle is equal to the numerical value of its perimeter. Explain your answer!
Solution. Let $a$ and $b$ be the lengths of the sides of the rectangle. Then, due to the condition of the problem, $ab=2(a+b)$, which means $ab-2a-2b=0$. By adding 4 to both sides of the equation, we get $ab-2a-2b+4=4$, from which $(a-2)(b-2)=4$. Then the following cases are possible:

1) $a-2=1, b-2=4$, i.e., $a=3, b=6$;
2) $a-2=2, b-2=2$, i.e., $a=4, b=4$, which are the required dimensions.