There are 48 cookies and 60 pieces of candy. The teacher uses all of the candy and cookies to fill bags for the students. He puts the same ratio of cookies to candy in each bag. What is the largest number of bags he could have made?