
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 circle M: $(x+1)^2+y^2=1$, and circle N: $(x-1)^2+y^2=9$, a moving circle P is externally tangent to circle M and internally tangent to circle N. The trajectory of the center of circle P is curve C.  
(1) Find the equation of C:  
(2) Let $l$ be a line that is tangent to both circle P and circle M, and $l$ intersects curve C at points A and B. When the radius of circle P is the longest, find $|AB|$.

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