
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 right triangle where $\angle C = 90^\circ$, and the following conditions hold:
\[
\cos^2 A + \cos^2 B + 2 \sin A \sin B \cos C = \frac{3}{2} \text{ and } \cos^2 B + 2 \sin B \cos A = \frac{5}{3}.
\]
Find integer values $x$, $y$, $z$, and $w$ such that 
\[
\cos^2 A + 2 \sin A \cos B = \frac{x-y\sqrt{z}}{w},
\]
where $x+y$ and $w$ are relatively prime and $z$ is not divisible by the square of any prime. Determine $x+y+z+w$.

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