Let's say I'm given $\binom{n}{2}$ pairs of numbers. What is the maximum number of triples (there are $\binom{n}{3}$ of them) I can form by using 3 pairs for every triplet? For example, I can use $(2,5),(5,8),(8,2)$ to form the triplet $(2,5,8)$. Remember that I can only use each pair once.
I've tried systematically counting, first counting each triplet with 1 in it, then 2, etc. but I found it to be very messy.
What's a good way to do this?