
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Given an ellipse $C$: $\frac{x^{2}}{a^{2}}+ \frac{y^{2}}{b^{2}}=1 (a > b > 0)$ with an eccentricity of $\frac{\sqrt{2}}{2}$ and its left focus at $F(-2,0)$.
(1) Find the equation of the ellipse $C$;
(2) If the line $y = x + m$ intersects the ellipse $C$ at two distinct points $A$ and $B$, and the midpoint $M$ of the segment $AB$ lies on the circle $x^{2} + y^{2} = 5$, find the value(s) of $m$.

Present the answer in LaTex format: \boxed{Your answer}
user