Juan deposits $1000 in a savings account that pays 8% compounded annually. Exactly 2 years later he deposits $3000; 2 years later he deposits $4000; and 4 years later he withdraws all of the interest earned to date and transfers it to an account that pays 10% compounded annually. How much money will be in each account 4 years after the transfer?