Apples are sold in bags of 6 and pears are sold in bags of 8. Jerry wants to buy the same number of each. What is the least number of apples and pears Jerry needs to buy?