n = \prod_{i=1}^r p_i^{a_i}