An investor has $12,000 to invest into two different funds. Fund A, which is a high risk fund, yields an average return of 14%. Fund B, which is a low risk fund, yields an average return of 6%. To reduce the risk, the investor wants the amount in fund B to be at least twice the amount in fund A. How much should be invested in each fund to maximize the return?