
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
In triangle $ABC$, the sides opposite to angles $A$, $B$, $C$ are $a$, $b$, $c$ respectively. Let vectors $\overrightarrow{m}=(a, b)$, $\overrightarrow{n}=(\cos A, \cos B)$, and $\overrightarrow{p}=(2\sqrt{2}\sin\frac{B+C}{2}, 2\sin A)$. If $\overrightarrow{m}$ is parallel to $\overrightarrow{n}$ and $|\overrightarrow{p}|=3$:
(1) Find the values of angles $A$, $B$, $C$;
(2) If $x\in[0, \frac{\pi}{2}]$, find the maximum and minimum values of the function $f(x) = \sin A \sin x + \cos B \cos x$.

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