Mika made two types of cakes: chocolate and vanilla. She cut all of the chocolate cakes into 8 slices each and all of the vanilla cakes into 6 slices each. If Mika ended up with the same total number of slices of each type of cake, what is the minimum number of slices of each type?