A 5,000 principal is invested into two accounts, one earning 1% and another earning 6% interest. If the total interest for the year is $170, how much is invested in each?