A science museum makes gift bags for students using 168 magnets, 48 robot figurines, and 24 packs of freeze-dried ice cream. What is the greatest number of gift bags that can be made using all of the items?