Michael has 27 baseball cards, 9 football cards and 6 basketball cards. What is the greatest number of friends he can give the cards to so that each friend receives the same number of baseball, football, and basketball cards and he gives all the cards away?