Sox, Napoli agree for three years, $39M