1996 AIME Problem 14

A 150 \times 324 \times 375 rectangular solid is made by gluing together 1 \times 1 \times 1 cubes. An internal diagonal of this solid passes through the interiors of how many of the 1 \times 1 \times 1 cubes?