first and naive draft for 3rd problem - finding prime factors