
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
The altitudes of an acute-angled triangle \( ABC \) drawn from vertices \( B \) and \( C \) are 7 and 9, respectively, and the median \( AM \) is 8. Points \( P \) and \( Q \) are symmetric to point \( M \) with respect to sides \( AC \) and \( AB \), respectively. Find the perimeter of the quadrilateral \( APMQ \).

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