
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
In a forest, there live elves and dwarves. One day, 60 inhabitants of this forest stood in a line facing the same direction. At this moment, some of them might be wearing caps. (The number of elves could range from 0 to 60, and the number of inhabitants wearing caps could also range from 0 to 60.)

Each of the 60 inhabitants said one of the following phrases:

- "My neighbor to the right is an elf."
- "My neighbor to the right is wearing a cap."

It is known that elves without caps always tell the truth, while elves with caps always lie. For dwarves, it is the opposite: dwarves without caps always lie, while dwarves with caps always tell the truth.

(a) What is the maximum number of elves without caps that could be in the line?

(b) What is the maximum number of elves with caps that could be in the line?

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