The answer is 0.

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

Let a be the smallest of the four numbers. If a >= 2, then ab >= 2b > a + b = cd > c + d. But the problem requires that ab = c + d, so we’ve reached a contradiction. Therefore, a < 2, and since a must be a positive integer, a = 1. When a = 1, the equation ab = c + d becomes b = c + d, and the equation a + b = cd becomes 1 + b = cd, which is equivalent to b = cd – 1. These results can be combined to give 1 + c + d = cd, which can be rewritten as cd – d – c – 1 = 0, or (c – 1)(d – 1) = 2. This final equation implies that c = 2 and d = 3, or vice versa.So b=5. The only solution is (1,5,2,3), or its combinations.