reg and 3sum