You are given a set of positive integers. You must arrange them into pairs such that:
- Each pair contains 2 numbers, one of which is a multiple of another. For example, 8 is a multiple of 4, and 9 is a multiple of 9.
- If the same number occurs many times in the initial set, it can be used that many times in the pairs; a number can even be paired with another occurence of the same number
- The maximum possible number of pairs is obtained.
Output must be the number of pairs. Shortest code wins.