
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
Lao You Fen was selected as an intangible cultural heritage in Guangxi. To meet consumer demand, a supermarket purchased two brands of Lao You Fen, brand A and brand B. It is known that the cost of brand A Lao You Fen per bag is $2 less than brand B Lao You Fen. The quantity of brand A Lao You Fen purchased for $2700 is the same as the quantity of brand B Lao You Fen purchased for $3300.  
$(1)$ Find the cost per bag of brand A and brand B Lao You Fen.  
$(2)$ This time, a total of 800 bags of brand A and brand B Lao You Fen were purchased, each sold for $13. The quantity of brand A Lao You Fen purchased does not exceed 3 times the quantity of brand B Lao You Fen purchased. If all the Lao You Fen is sold out, how many bags of brand A and brand B Lao You Fen should the supermarket purchase to maximize profit? What is the maximum profit?

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