A bakery sells 3 muffins for every 5 pizza pies. The bakery sold a total of 24 muffins and pizza pies together. How many of each kind did the bakery sell?