
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
Given a certain pharmacy bought 41 boxes of masks from factory A at a price of $a$ yuan per box and 59 boxes of masks from factory B at a price of $b$ yuan per box, where $a < b$, calculate the total cost and revenue of selling all the masks at a price of $\frac{{a+b}}{2}$ per box.

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