Ahmed invests $4000 in two different accounts. The first account paid 10 %, the second account paid 9% in
interest. At the end of the first year he had earned $370 in interest. How much was in each account?