Max has 3 fiction books and 6 nonfiction books to donate to the community center. He wants to package them so that there is an equal number of fiction and nonfiction books in each group. He also wants to have as many packages as possible. How many books are in each group?