Jane and her friends are going on a hiking trip. Jane wants to make snack packs to take on the trip. She has 24 apples, 36 small bags of trail mix and 18 cans of juice. Each snack pack must have the same number of apples, bags of trail mix and cans of juice. What is the greatest number of apples that will be in each snack pack?