The profit of a company, in thousands dollars, is the difference between the company's revenue and cost. The cost, C(x), and the revenue, R(x), are functions for a particular company. The x represents the number of thousands of items produced and sold to distributors. Here, C(x) = 12x + 28 and R(x) = -x^2 + 24x.
2a. How many items need to be produced and sold to maximize the profit?
2b. Determine the maximum profit of the company.