At a convention of pairs of twins and sets of triplets, there were 9 sets of twins and 6 sets of triplets, each set being from a different family. Each twin shook hands with all the twins except his or her sibling and with half the triplets. Each triplet shook hands with all the other triplets except his or her siblings and with half the twins.
How many handshakes took place all together?