
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 moving point $M$ whose distance to point $A(2,0)$ is half of its distance to point $B(8,0)$.
$(1)$ The equation of the trajectory of point $M$;
$(2)$ Find the equation of the line that is tangent to the trajectory of point $M$, and has equal intercepts on the $x$-axis and $y$-axis.

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