3. Maxim came up with a new way to divide numbers by a two-digit number $N$. To divide any number $A$ by the number $N$, the following steps need to be performed:
1) Divide $A$ by the sum of the digits of the number $N$;
2) Divide $A$ by the product of the digits of the number $N$;
3) Subtract the second result from the first.

For which numbers $N$ will Maxim's method give the correct result? (20 points)
Solution: Let $N=\overline{x y}=10 x+y$, where $x, y$ are digits. We need to find all pairs $(x, y)$ such that $\frac{A}{10 x+y}=\frac{A}{x+y}-\frac{A}{x y}$, which means $\frac{1}{10 x+y}=\frac{1}{x+y}-\frac{1}{x y}$. Note that $y \neq 0$. Transform the equation to the form

$$
\begin{gathered}
x y(x+y)=x y(10 x+y)-(x+y)(10 x+y) \\
(x+y)(10 x+y)=x y \cdot 9 x \\
10 x^{2}+11 x y+y^{2}=9 y x^{2}
\end{gathered}
$$

Solve the equation as a quadratic in terms of $x$. For this, rewrite the equation as

$$
\begin{gathered}
(10-9 y) x^{2}+11 y x+y^{2}=0 \\
D=121 y^{2}-4 y^{2}(10-9 y)=81 y^{2}+36 y^{3}=9 y^{2}(9+4 y)
\end{gathered}
$$

For the root to be an integer, the discriminant must be a perfect square, which means $9+4 y$ must also be a perfect square. Trying values of $y$ from 1 to 9, only $y=4$ works. Then the roots of the equation are $x_{1}=\frac{-11 \cdot 4+3 \cdot 4 \cdot 5}{2 \cdot(10-9 \cdot 4)}=-\frac{4}{13}$ and $x_{2}=\frac{-11 \cdot 4-3 \cdot 4 \cdot 5}{2 \cdot(10-9 \cdot 4)}=2$. Only $x=2$ is valid, so $N=24$. For this number, Maksim's method gives the correct result.

Answer: 24