
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
Against the backdrop of the global pandemic, the third China International Import Expo was held as scheduled at the National Exhibition and Convention Center in Shanghai from November 5th to 10th, 2020. This event is of great significance as it is a key measure for China to build a new development pattern of "dual circulation" and demonstrate its determination to comprehensively expand opening up, which helps promote mutually beneficial and win-win development among countries. To ensure the successful holding of the expo, Shanghai formulated and implemented strict epidemic prevention plans. During the expo, a domestic company in China conducted research through the expo and reached a cooperation agreement with a multinational company to jointly invest in producing a high-tech product. It is estimated that a fixed cost of 2.6 million yuan will be required for the production of this product throughout the year. Additionally, an investment of R(x) million yuan is needed for producing x thousand units of the product, where R(x) is defined as follows: 

\[ R(x) = \begin{cases} 10x^2 + ax, & 0 < x < 40 \\ \frac{901x^2 - 9450x + 10000}{x}, & x \geq 40 \end{cases} \]

It was calculated that an investment of 40 million yuan is needed to produce 10 thousand units of the product. According to the research, when the selling price of the product is 900 million yuan per thousand units, all products produced within the year can be sold. 

$(1)$ Find the function relationship of the annual profit W(x) (in million yuan) of the company with the annual output x (in thousand units). 

$(2)$ At what annual output (in thousand units) does the company achieve the maximum annual profit? What is the maximum annual profit?

Note: Profit = Revenue - Cost.

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