
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 right $\triangle XYZ$ with hypotenuse $\overline{XY}$, $XZ = 9$, $YZ = 40$, and $\overline{ZD}$ is the altitude to $\overline{XY}$. Let $\omega$ be the circle having $\overline{ZD}$ as a diameter. Let $J$ be a point outside $\triangle XYZ$ such that $\overline{XJ}$ and $\overline{YJ}$ are both tangent to circle $\omega$. The ratio of the perimeter of $\triangle XYJ$ to the length $XY$ can be expressed in the form $\frac {p}{q}$, where $p$ and $q$ are relatively prime positive integers. Find $p + q$.

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