246. The lateral surface area of a rectangular parallelepiped is equal to the sum of the areas of the bases. Find its dimensions, if they are expressed as integers.
246. Denoting the sides of the base by $x$ and $y$, and the height by $z$, we obtain the equation:

$$
x z + y z = x y
$$

Answer. $x = n(n-m), y = m n, \quad z = m(n-m) \quad$ up to similarity ( $m < n$ ).