The cost of 1 kg of sugar is 78 rupees. It costs 126 rupees per kilo of rice. If 12 kg of sugar and 7 kg of rice were purchased, what would be the total cost?