
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
There are five students named A, B, C, D, and E. Find:<br/>$(1)$ If the five students stand in a row and A and E are not at the ends, how many different ways can they be arranged?<br/>$(2)$ If the five students stand in a row with the condition that A and B must be adjacent, and C and D cannot be adjacent, how many different ways can they be arranged?

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