Naive trial division