An investor has money in two investment funds. Last year, the first fund paid a dividend of 8% and the second a dividend of 2%, and the total dividends received were $780. This year, the first fund paid a 10% dividend and the second only 1%, and the total dividends received were $810. How much was invested in each fund?