<s>[INST] $a+b=c \times d$ and $a\times b = c + d$ There is a 'nice' relationship between the integers (1,5) and (2,3) as 
$$1+5=2 \times 3;$$
$$1\times 5 = 2 + 3.$$
So I tried to find all positive integers pairs $(a, b)$ and $(c, d)$ such that $$a+b=c \times d;$$ 
$$a\times b = c + d.$$
To find this, $a, b, c, d$ must satisfy $$(a+1)(b+1)=(c+1)(d+1).$$ However, this condition is only necessary but not sufficient.
Any idea?
 [/INST] Define $r$, $s$ by $(x-a)(x-b)=x^2-rx+s$. Then $r=a+b=cd$ and $s=ab=c+d$, so $(x-c)(x-d)=x^2-sx+r$. Thus, the polynomials $x^2-rx+s$ and $x^2-sx+r$ both have only integer roots. Thus, $r^2-4s$ and $s^2-4r$ are both squares: $r^2-4s=u^2,s^2-4r=v^2$. 
EDIT: Continuing, from $r^2-4s=u^2$ we get $4s=r^2-u^2\ge r^2-(r-2)^2=4r-4$, so $s\ge r-1$. By symmetry, $r\ge s-1$, so we have $r=s$ or $r=s\pm1$. If $r=s$ then $r^2-4r$ is a square, but $r^2-4r+4$ is a square, so we have two squares differing by $4$, which gives $r^2-4=0$, $r=0$ or $r=4$. These lead to the solutions $a=b=c=d=0$ and $a=b=c=d=2$. 
$r=s+1$ implies $s^2-4s-4=(s-2)^2-8$ is a square. The only pair of squares differing by $8$ is $3^2-1^2$, and this leads to the $(1,5)$, $(2,3)$ solution (and its permutations) that we already have. 
</s>