You invest $10,000 into two accounts. One account earns 5% annually and the other earns 8% annually. If the total interest earned from both accounts in a year is $590, how much is invested in each account?​