Brooke has 24 pencils and 36 erasers. If she makes identical goodie bags for her friends with no pencils or erasers left over, what is the greatest number of snack bags Brooke can make?