Naively implement largest prime factor