A stock analyst deposited a total of $50,000 in two simple interest accounts. The annual simple interest rate on one account is 4%. The annual simple interest rate on the second account is 9%. How much was invested in each account if the total annual interest earned is 6% of the total investment?