
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 3 boys and 4 girls lining up in a queue according to different requirements. Determine the number of ways for the different queue arrangements.

(1) Boy A cannot be in the middle or at either end;

(2) Boys A and B must be at both ends.

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