
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$, angle $C$ is a right angle, and the altitude from $C$ meets $\overline{AB}$ at $D$. The lengths of the sides of $\triangle ABC$ are integers, $BD = 17^3$, and $\cos B = p/q$, where $p$ and $q$ are relatively prime positive integers. Find $p+q$.

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