
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
Let $a_1, a_2, \ldots, a_n$ be a permutation of the numbers $1, 2, \ldots, n$. The number of elements to the left of $a_i$ that are smaller than $a_i$ is called the inversion number of $a_i$ (for $i=1, 2, \ldots, n$). In all permutations formed by the numbers $1, 2, 3, 4, 5, 6, 7, 8$, find the number of distinct permutations where the inversion number of $8$ is $2$, the inversion number of $7$ is $3$, and the inversion number of $5$ is $3$.

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