
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$ with its center at the origin and its foci on the $x$-axis, and the distance between the foci is $2$, and the eccentricity is $\frac{1}{2}$  
$(1)$ Find the equation of the ellipse $C$;  
$(2)$ Suppose a line $l$ passes through the point $M(0,1)$ and intersects the ellipse $C$ at points $A$ and $B$. If $\overrightarrow{AM}=2\overrightarrow{MB}$, find the equation of the line $l$.

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