Answer:
, , ,
Let , be the roots of the first equation and , the roots of the second one. It is easy to see that if we have one solution , we can swap and or and or both and get another solution—therefore we will write only one of these solutions. According to Vieta’s formulas,
Combining these we obtain
which can be rearranged to
If both summands and are positive, i.e. equal to , we obtain solutions and . If one of the summands is zero, there are solutions and .
The remaining case is that one of the summands is negative; for this to happen, one of , , , has to equal . W.l.o.g. let , then and we can modify the equation to
or , which yields and . We infer that there in no solution with a negative summand.
Finally, the possible values of are , , , . We can easily check that all of these values of satisfy the conditions from the statement.