Use auto to avoid forcing signed int prime factors.