storing pairs of ints as num powers of primes