Belinda had $50,000 to invest. She invested part of it at 10% and the remainder at 18%. If her income fromt he two investments was $5,640, then how much did she invest at each rate?