primeFactor logic

primeFactor logic