Solved for general case, finds prime factors of a number.