Austin is preparing gift bags for his birthday party. He has 10 bags of candy and 9 funny hats. He wants to prepare as many bags as possible without having any leftovers, and each bag must be the same. What is the maximum number of bags Austin can make?