Let m be a constant not equal to 0 or 1. Then the graph of x^2 + my^2 = 1 is a conic section with two foci. Find all values of m such that the foci both lie on the circle x^2 + y^2 = 2. Enter all possible values of m separated by commas.