program to factor a single-valiable integer polynomial