
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
A line \( l \) passes through point \( M(1, 2) \) and intersects the x-axis at point \( P \) and the y-axis at point \( Q \).
(1) If point \( M \) is the midpoint of \( P \) and \( Q \), find the equation of line \( l \).
(2) If the distance from the origin to line \( l \) is \( d \), find the equation of line \( l \) when the distance \( d \) is maximized.

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