There are 4 distinct math books and 3 distinct science books. They are to be placed on a shelf of 7 available slots. If the math books must occupy the first two slots and the last two slots, and the science books must fill the remaining middle three slots, how many distinct arrangements are possible?
72
120
144
240
5040