    go [] n = (one,n)
    go (p : ps) n =
        if n <= 1 then (one,n)
        else (multiply f (primePower p r), m)
      where
        (r,s) = factorOut p n
        (f,m) = go ps s

destSmooth :: [Natural] -> Natural -> Maybe Factor
destSmooth ps n =
    if m == 1 then Just f else Nothing
  where
    (f,m) = trialDivision ps n