Michael wants to arrange a doubles tennis tournament among his friends. However, he has some peculiar conditions: the total number of matches should equal the total number of players, and every pair of friends should play as either teammates or opponents in at least one match. The number of players in a single match is four. What is the largest number of people who can take part in such a tournament?