ok... 14 students and the teacher wants each student to have the same number of slices. There is 8 slices per pizza.
do your factors of 8 and at the same time do your factors of 14
14*4=56
8*7=56
so in order for each student to get the same number of slices he will have to buy 7 pizza and they will get 4 slices each.