Solution
Assume that
. We split into two cases.
Case 1:
. Then,

with
. If

then obiously

works. If
, then
, and since

we must have

a contradiction.
Case 2:
. Then,

with
. Let

with
. Therefore,
.
Thus,

with
, and if

then

a contradiction. Moreover, if
, then

and so

a contradiction.
Therefore,

and
.
Taking all cases, we obtain

that is
.
To sum up, we obtain the solutions

and
.