If there are 5 different math books, 3 different science books, and 2 different English books, how many ways can you arrange them on a shelf?

A) 60 ways
B) 120 ways
C) 240 ways
D) 360 ways