If you want multiplicities, you can put it in map that maps pair to ammount. This way there will only be one pair of given values, but it can represent multiple occurances.
Then if you have lot of repeatet values and want to perform some operation on all values, you can save lot of computations.