Will crime be reduced by punishing or by rehabilitating criminals?

Will crime be reduced by punishing or by rehabilitating criminals?