A General Strategy For Factoring