Ming bought 40 pencils and Catherine bought 24. If each package of pencils sold at the store contain the same number of pencils, what is the largest possible number of pencils in a package?