
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
Xiao Min plans to buy a bouquet of lilies and carnations to give to her mother on Mother's Day. It is known that buying 1 lily and 3 carnations costs $23$, and the price of 2 lilies is $4$ more than the price of 1 carnation.
$(1)$ Find the cost of buying one carnation and one lily each.
$(2)$ Xiao Min plans to buy a total of 12 lilies and carnations, with at least 5 carnations. Let the cost of buying this bouquet of flowers be $w$ dollars, and let the number of lilies be $x$. Find the functional relationship between $w$ and $x$, and design a flower-buying plan to minimize the cost, stating the minimum cost.

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