Artificial intelligent assistant

A mental question We are given a rectangle whose perimeter and area are equal. We have to find their length and breadth.(Both length and breadth should differ). I solved the question via hit and trial method and got the answer 6&3, but I want to know if the question can be done as an equation. Because when I try, l*b=2l+2b ~(l*b)/2 = l+b ~After this I get stuck and one time i got on and found length and breadth as -2 and 1 which practically is not possible as length and/or breadth cannot be negative

If you want _integer_ solutions, there are only few: From $$b=\frac{2l}{l-2}$$ we see that $l-2$ is a positive divisor of $2l$, especially $l\ge 3$. As $\gcd(l,l-2)=\gcd(l,2)\le 2$, we even have that $l-2$ divides $4$. Thus leaves us with

* $l-2=1$ and then $l=3$, $b=6$
* $l-2=2$ and then $l=4$, $b=4$, which is not allowed
* $l-2=4$ and then $l=6$, $b=3$, the "dual" to the first



All other solutions (with arbitrary $l>2$, $l\
e 4$) are valid, but not integer solutions.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 13a7ca4d73b076235fbd90ff51be650c