A restaurant owner washed 87 kilograms of vegetables, some spinach and some carrots. The spinach came in 5-kilogram bags and the carrots came in 7-kilogram bags. The owner washed 15 bags of vegetables in all. How many bags of each kind did he wash?