
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
Calculate the number of different arrangements that meet the following requirements:  
(1) Arrange 7 people in a row such that two individuals, A and B, are not adjacent to each other;  
(2) Select 4 out of 7 people to participate in a 4×100 meters relay race, both A and B must be included, but A cannot run the first leg and B cannot run the last leg.

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