Let the two numbers we have to find be x and y.

Now their sum is 31

=> x + y = 31

Their product is 361

=> x*y = 361

x + y = 31

=> x = 31 - y

(31 - y)*y = 361

=> 31y - y^2 = 361

=> y^2 - 31y + 361 = 0

So the numbers we get are complex:

x = 31/2 + sqrt ( 31^2 - 4*361) /2

=> x = 31/2 - i* sqrt 483 /2

and y = 31/2 + i sqrt 483/2

**The numbers are 31/2 - i* sqrt 483 /2 and 31/2 + i*sqrt 483 /2**

Let the sum of the two numbers x1 and x2 = 31 and their product x1x2 = 361. We have to find the numbers x1 and x2.

So x1 and x2 are the roots of x^2-(x1+x2)x+x1x2 = 0, or

x^2-31x+361 = 0.

We know that the roots of the equation ax^2+bx+c = 0 is given by:x1 = {-b+sqrt(b^2-4ac)}/2a and

x2 = {-b+sqrt(b^2-4ac)}/2.

Here a = 1, b= -31 and c= 361.

So x1 = {-(-31) + sqrt{(-31)^2 - 4*361)}/2

x1 = {31+sqrt(-483)}/2

x2 = {31-sqrt(-483)}/2.

Therefore there are no real numbers whose sum is 31 and the product is 361. However there is solution in complex numbers.. So , x1 = {31+sqrt(-483)}/2 and x2 = {31-sqrt(-483)}/2 are the solutions.