
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 that the center of an ellipse is at the origin, the foci are on the $x$-axis, and the distances from the left focus to the coordinate origin, the right focus, and the right directrix form an arithmetic sequence. If a line $l$ intersects this ellipse at points $A$ and $B$, the midpoint $M$ of $AB$ is $(-2,1)$, and $|AB|=4\sqrt{3}$, find the equation of the line $l$ and the equation of the ellipse.

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