A classic problem is to find all rectangles with integer sides such that the numeric values for the area and perimeter are equal.

There are two distinct solutions to this problem. Can you find them, with proof?

A possible variant to the classic problem is to generalize the sides into a pair of arbitrary non-zero Gaussian integers.

That is, what pairs of non-zero Gaussian integers x and y satisfy x*y=2*(x+y)?