ISPN-5089 Store divisors in a temporary variable to avoid java.lang.ArithmeticException: / by zero