Maria baked bran and oatmeal muffins for the class. The recipe for bran muffins calls for 5kg of butter and 2kg of flour, and 2kg of butter and 3kg of flour to make the oatmeal muffins. Altogether she used 18kg of butter and 16kg of flour. How many batches of each type of muffin did she bake?