Anna baked 18 oatmeal and 27 chocolate chip cookies. She wants to divide them into identical containers so that each container has the same number of each kind of cookie for her friends. If she wants each container to have the greatest number of cookies possible, how many containers does she need?