Version 1 of RandomPairs program