
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 two types of products, A and B. The profits obtained from distributing these two products are p (in ten thousand yuan) and q (in ten thousand yuan), respectively. Their relationship with the invested capital x (in ten thousand yuan) is estimated based on experience to be: $p=-x^2+4x$, $q=2x$. Now, with an investment of 3 ten thousand yuan in distributing products A and B, how much capital should be invested in each product to obtain the maximum profit? What is the total maximum profit in ten thousand yuan?

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