You are trying to distribute 566 ice creams and 183 cookies evenly to all of the students in a class. But you end up having 5 ice creams left and 4 cookies short. What is the maximum number of students in the class?

To solve this problem, we can use a combination of integer division and modulo operation.

First, let's find the number of ice creams per student. Subtracting the remaining 5 ice creams, we have 566 - 5 = 561 ice creams to distribute. Since we want to distribute them evenly, we divide this number by the number of students, let's call it "s": 561 / s.

Similarly, let's find the number of cookies per student. Subtracting the remaining 4 cookies, we have 183 - 4 = 179 cookies to distribute. Again, dividing this by the number of students would give us 179 / s.

Since we want to distribute both ice creams and cookies, the number of students should be the same for both calculations. We need to find a value for "s" where both 561 / s and 179 / s are integers.

Let's examine the factors of 561: 3, 11, 17, and 561. None of these factors divides evenly into 179.

Now, let's examine the factors of 179: 1 and 179. Both of these factors divide evenly into 561, so the maximum number of students in the class would be 179.

So, the maximum number of students is 179.