A farmer has 10 acres to plant in corn and oats. He has to plant at least 7 acres. However, he has only $1200 to spend and each acre of corn costs $200 to plant and each acre of oats costs $100 to plant. Moreover, the farmer has to get the planting done in 12 hours and it takes an hour to plant an acre of corn and 2 hours to plant an acre of oats. If the profit is $500 per acre of corn and $300 per acre of oats, how many acres of each should be planted to maximize profits?