PASCAL 2022 Problem 20

A pizza is cut into 10 pieces. Two of the pieces are each \frac{1}{24} of the whole pizza, four are each \frac{1}{12}, two are each \frac{1}{8}, and two are each \frac{1}{6}. A group of n friends share the pizza by distributing all of these pieces. They do not cut any of these pieces. Each of the n friends receives, in total, an equal fraction of the whole pizza. The sum of the values of n with 2 \leq n \leq 10 for which this is not possible is

Answer Choices
A. 31
B. 35
C. 40
D. 39
E. 36