use a long array to store appropriate divisor