There are 850 Douglas fir and Ponderosa pine trees in a section of forest bought by Karamazov Logging Co. The company paid an average of $300 for each Douglas fir and $225 for each Ponderosa pine. If the company paid $217,500 for the trees, how many of each kind did the company buy?