
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 a line $y = -x + 1$ and an ellipse $\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$ ($a > b > 0$) intersect at points A and B.
(1) If the eccentricity of the ellipse is $\frac{\sqrt{2}}{2}$ and the focal distance is 2, find the length of segment AB.
(2) If vectors $\overrightarrow{OA}$ and $\overrightarrow{OB}$ are perpendicular to each other (where O is the coordinate origin), when the eccentricity $e$ of the ellipse is in $[\frac{1}{2}, \frac{\sqrt{2}}{2}]$, find the maximum length of the major axis of the ellipse.

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