
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 the function $f(x) = A\sin(\omega x + \frac{\pi}{3})$ where $A > 0$ and $\omega > 0$, has a maximum value of 2 and a period of $\pi$.
(1) Find the values of the real numbers $A$ and $\omega$;
(2) When $x \in \left[0, \frac{\pi}{2}\right]$, find the range of the function $f(x)$.

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