if you have a fraction, say (25*3*pi*h^3)/(25*pi*24*24*24*3), what would the reduction of this fraction be?

i thought that since they are all factors, you could change the 3s for 1s (3/3=1)and the 24s for 8s (since 24/3=8), the the 25s and pis would cancel and you're left with (h^3)/(8^3), but the book i have says the answer is (h^3)/(24^3). why is the way i was doing it wrong?