A small construction company borrowed $500000 to purchase some machinery. Some of the money was borrowed at 9% interest, some at 10% interest, and the remainder at 12% interest. The annual interest was $52000. the amount borrowed at 10% was 2.5 times the amount borrowed at 9%. How much was borrowed at each amount?