Understand the method
For 36, start with 1 × 36, then 2 × 18, 3 × 12, and 4 × 9, followed by 6 × 6. These are all the positive factor pairs. Once the trial divisor passes the square root of 36, the pairs would repeat in reverse, so checking up to the square root is sufficient.