Prime factors exercise